/* MLN Free Registration Form Styles */

.mln-registration-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.mln-form {
    width: 100%;
}

/* Cards */
.mln-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mln-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.mln-card-content {
    padding: 20px;
}

/* Messages */
.mln-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid;
}

.mln-message.mln-error {
    background: #fee;
    border-color: #fcc;
    color: #c00;
}

.mln-message.mln-success {
    background: #efe;
    border-color: #cfc;
    color: #0a0;
}

.mln-message.mln-info {
    background: #eef;
    border-color: #ccf;
    color: #00a;
}

.mln-message ul {
    margin: 10px 0 0 20px;
}

/* Form Fields */
.mln-form-fields {
    display: block;
}

.mln-form-field {
    margin-bottom: 20px;
}

.mln-form-field.mln-full-width {
    grid-column: 1 / -1;
}

.mln-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.mln-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.mln-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.mln-input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

textarea.mln-input {
    resize: vertical;
    min-height: 100px;
}

.mln-hint {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0;
}

.required {
    color: #c00;
}

/* Column Layout */
.mln-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .mln-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Referrer Search */
.mln-referrer-wrapper {
    position: relative;
}

.mln-referrer-search-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.mln-referrer-search-container #referrer_search {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.mln-referrer-search-container #referrer_search.mln-selected {
    border-color: #0a0;
    background-color: #f0fff0;
}

.mln-dropdown-toggle {
    width: 40px;
    border: 1px solid #ddd;
    border-left: none;
    background: #f5f5f5;
    cursor: pointer;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

.mln-dropdown-toggle:hover {
    background: #e0e0e0;
}

.mln-dropdown-toggle:active {
    background: #d0d0d0;
}

.mln-referrer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 2px;
}

.mln-referrer-dropdown.active {
    display: block;
}

.mln-referrer-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.mln-referrer-item:hover {
    background-color: #f5f5f5;
}

.mln-referrer-item:last-child {
    border-bottom: none;
}

.mln-referrer-item.mln-no-results,
.mln-referrer-item.mln-error {
    cursor: default;
    color: #999;
    font-style: italic;
}

.mln-referrer-item.mln-error {
    color: #c00;
}

.mln-referrer-name {
    font-weight: bold;
    margin-bottom: 2px;
    color: #333;
}

.mln-referrer-email {
    font-size: 0.9em;
    color: #666;
}

/* Submit Button */
.mln-form-submit {
    text-align: center;
    padding: 20px 0;
}

.mln-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mln-btn-primary {
    background: #0073aa;
    color: #fff;
}

.mln-btn-primary:hover {
    background: #005a87;
}

.mln-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#mln-processing {
    display: inline-block;
    margin-left: 15px;
    color: #666;
    font-style: italic;
}

/* Membership Level Display */
.mln-level-name {
    font-size: 16px;
    margin-bottom: 10px;
}

.mln-level-cost {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.mln-level-cost p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0a0;
}

/* Responsive Design */
@media (max-width: 600px) {
    .mln-registration-wrap {
        padding: 10px;
    }
    
    .mln-card-content {
        padding: 15px;
    }
    
    .mln-btn {
        width: 100%;
    }
}
