﻿/* Custom styling for Select2 dropdowns */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px !important;
    height: 38px !important;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    display: flex !important;
    align-items: center !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding-left: 40px;
    padding-right: 30px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: normal;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    width: 30px;
    right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Extension dropdown - styled exactly like Select2 but without search */
select#Registration_NameExtension {
    display: block;
    width: 100%;
    height: 38px !important;
    padding: 0 30px 0 40px;
    font-size: 0.9rem;
    color: #1e293b;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    line-height: normal !important;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    /* Custom dropdown arrow matching Select2 */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    /* For the placeholder/default option */
    color: #1e293b;
}

    select#Registration_NameExtension option {
        color: #1e293b;
        padding: 8px;
        font-size: 0.9rem;
    }

        select#Registration_NameExtension option:first-child {
            color: #94a3b8; /* Muted color for placeholder */
        }

    select#Registration_NameExtension:focus {
        border-color: #3454d1;
        outline: 0;
        box-shadow: 0 0 0 3px rgba(52, 84, 209, 0.1);
    }

/* Textboxes - keep consistent */
.input-group-elegant input,
input.form-control-elegant {
    width: 100%;
    height: 38px !important;
    padding: 0 0.75rem 0 40px;
    font-size: 0.9rem;
    color: #1e293b;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    line-height: normal !important;
    display: flex;
    align-items: center;
}

    .input-group-elegant input:focus,
    input.form-control-elegant:focus {
        border-color: #3454d1;
        outline: 0;
        box-shadow: 0 0 0 3px rgba(52, 84, 209, 0.1);
    }

/* Bank account inputs (no left icon) */
.bank-account-item input {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    height: 38px !important;
    line-height: normal !important;
    display: flex;
    align-items: center;
}

/* Icon positioning - ensure icons are vertically centered */
.select-group-elegant, .input-group-elegant {
    position: relative;
    display: block;
}

    .select-group-elegant i, .input-group-elegant i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        z-index: 10;
        pointer-events: none;
        font-size: 1rem;
        line-height: 1;
    }

/* Placeholder color for text inputs */
::placeholder {
    color: #94a3b8;
    opacity: 1;
    line-height: normal;
}

/* Firefox placeholder fix */
input:-moz-placeholder,
textarea:-moz-placeholder {
    line-height: normal;
}

/* Only hide selects that have the select2-dropdown class */
select.select2-dropdown {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

/* Select2 dropdown styling */
.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    font-family: 'Inter', sans-serif;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #3454d1 !important;
}

.select2-container--bootstrap-5 .select2-search__field {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    font-family: 'Inter', sans-serif;
    height: 36px;
    display: flex;
    align-items: center;
}

    .select2-container--bootstrap-5 .select2-search__field:focus {
        border-color: #3454d1;
        outline: none;
        box-shadow: 0 0 0 3px rgba(52, 84, 209, 0.1);
    }

/* Form labels */
.form-label-elegant {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #4a5568;
    display: block;
}

/* Small text hints */
.text-muted.small {
    font-size: 0.75rem;
    color: #94a3b8 !important;
}

/* Required star */
.required-star {
    color: #dc3545;
    margin-left: 2px;
}

/* Section titles */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3454d1 0%, #2342b0 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

    .section-title-icon i {
        color: white;
        font-size: 1rem;
    }

.section-title-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.section-divider {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #3454d1 0%, transparent 100%);
    margin-left: 15px;
}

/* Bank account grid */
.bank-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.bank-account-item {
    display: flex;
    flex-direction: column;
}

.bank-account-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

    .bank-account-label img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .bank-account-label span {
        font-size: 0.85rem;
        font-weight: 500;
        color: #4a5568;
    }

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-elegant {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
}

.btn-elegant-light {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

    .btn-elegant-light:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.btn-elegant-primary {
    background: linear-gradient(135deg, #3454d1 0%, #2342b0 100%);
    border: none;
    color: white;
}

    .btn-elegant-primary:hover {
        background: linear-gradient(135deg, #2342b0 0%, #1a3490 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(52, 84, 209, 0.2);
    }

/* Email and mobile format hints */
#emailFormatHint, #mobileFormatHint {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* ===== PASSWORD FIELD STYLES - FIXED ALIGNMENT ===== */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

    .password-field .password-toggle {
        position: absolute;
        right: 12px; /* Matches lock icon left position */
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        color: #6c757d;
        z-index: 10;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s ease;
    }

        .password-field .password-toggle i {
            font-size: 1.2rem;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .password-field .password-toggle:hover {
            color: #3454d1;
        }

        .password-field .password-toggle:focus {
            outline: none;
        }

    .password-field input {
        width: 100%;
        height: 38px !important;
        padding-right: 50px !important; /* Space for eye icon (12px left + 30px icon + 8px buffer) */
        padding-left: 40px !important; /* Space for lock icon (12px left + 16px icon + 12px buffer) */
        line-height: normal;
    }

/* Lock icon specific alignment */
.input-group-elegant i.fa-lock {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 10;
    pointer-events: none;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Password requirements styling */
.password-requirements {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #3454d1;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.requirement-item {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .requirement-item i {
        font-size: 0.6rem;
        transition: all 0.2s ease;
        width: 16px;
    }

    .requirement-item.valid {
        color: #17c666;
    }

        .requirement-item.valid i {
            color: #17c666;
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            font-size: 0.9rem;
        }

    .requirement-item.invalid {
        color: #dc3545;
    }

        .requirement-item.invalid i {
            color: #dc3545;
        }

#passwordMatchIndicator {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    #passwordMatchIndicator i {
        font-size: 0.8rem;
        transition: all 0.2s ease;
        margin-right: 5px;
    }

    #passwordMatchIndicator.match {
        color: #17c666;
    }

        #passwordMatchIndicator.match i {
            color: #17c666;
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }

    #passwordMatchIndicator.no-match {
        color: #dc3545;
    }

        #passwordMatchIndicator.no-match i {
            color: #dc3545;
        }

/* ===== MOBILE RESPONSIVE ADJUSTMENTS ===== */
/* Mobile Full-Screen Design */
@media (max-width: 768px) {
    .registration-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        min-height: 100vh;
        background: #f8fafc;
    }

    .container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .row {
        margin: 0 !important;
    }

    .col-12 {
        padding: 0 !important;
    }

    .registration-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        min-height: 100vh;
        background: white;
    }

    .card-header-elegant {
        border-radius: 0 !important;
        padding: 1rem !important;
        background: linear-gradient(135deg, #3454d1 0%, #2342b0 100%);
    }

    .card-body {
        padding: 1.5rem !important;
    }

    .section-title {
        margin-bottom: 1rem;
    }

    /* Bank accounts on mobile */
    .bank-account-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .bank-account-item {
        background: #f8fafc;
        padding: 0.75rem;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
    }

    .bank-account-label {
        margin-bottom: 0.5rem;
    }

        .bank-account-label img {
            width: 28px;
            height: 28px;
        }

        .bank-account-label span {
            font-size: 0.95rem;
            font-weight: 600;
        }

    .bank-account-item input {
        height: 44px !important;
        font-size: 16px !important;
        background: white;
        border: 1px solid #e2e8f0;
    }

    .action-buttons {
        flex-direction: column-reverse;
        gap: 0.75rem;
        position: sticky;
        bottom: 0;
        background: white;
        padding: 1rem 0;
        margin: 1rem 0 0;
        border-top: 1px solid #e2e8f0;
    }

        .action-buttons .btn-elegant {
            width: 100%;
            margin: 0;
            height: 44px;
        }

    /* Increase touch target sizes for mobile */
    .form-label-elegant {
        font-size: 0.9rem;
        margin-bottom: 0.35rem;
    }

    .select-group-elegant i,
    .input-group-elegant i {
        font-size: 1.1rem;
    }

    input.form-control-elegant,
    select#Registration_NameExtension,
    .select2-container--bootstrap-5 .select2-selection {
        height: 44px !important;
        font-size: 16px !important;
    }

    /* Better spacing for mobile */
    .row.g-4 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    /* Improve readability */
    .header-title {
        font-size: 1.5rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
    }

    /* Sticky validation messages */
    .text-danger.small {
        font-size: 0.8rem;
        margin-top: 0.25rem;
        display: block;
    }

    /* ===== MOBILE PASSWORD FIELD ADJUSTMENTS ===== */
    .password-field .password-toggle {
        right: 15px; /* Slightly increased for better touch target */
        width: 35px;
        height: 35px;
    }

        .password-field .password-toggle i {
            font-size: 1.3rem;
        }

    .password-field input {
        height: 44px !important;
        padding-right: 58px !important; /* Increased for better touch area */
        padding-left: 45px !important; /* Matches lock icon spacing on mobile */
    }

    /* Password requirements collapse on mobile */
    .password-requirements {
        max-height: 250px;
        overflow: hidden;
        opacity: 1;
        margin: 10px 0;
        transition: all 0.3s ease;
    }

        .password-requirements.requirements-met {
            max-height: 0;
            opacity: 0;
            margin: 0;
            padding: 0;
            border: none;
            visibility: hidden;
            pointer-events: none;
        }

    .requirement-item {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .password-field .password-toggle {
        right: 12px; /* Back to standard spacing */
    }

    .password-field input {
        padding-right: 52px !important;
        padding-left: 42px !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    .password-field .password-toggle {
        right: 10px;
    }

    .password-field input {
        padding-right: 48px !important;
        padding-left: 40px !important;
    }
}

/* Smallest devices */
@media (max-width: 320px) {
    .password-field .password-toggle {
        right: 8px;
    }

    .password-field input {
        padding-right: 45px !important;
        padding-left: 38px !important;
    }
}
