* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background: #f0f2f5;
    margin: 0;
    padding: 0;
}

/* Left Side - Signup Form */
.signup-section {
    flex: 1;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
    position: relative;
}

/* Right Side - Hero Section with Background */
.hero-section {
    flex: 1;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 85, 155, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 30px;
}

.read-more-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.signup-container {
    width: 100%;
    max-width: 520px;
    background: white;
    padding: 32px 40px 28px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    transform: translateY(-20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Floating arrow pointer */
.signup-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid white;
    filter: drop-shadow(0 -3px 3px rgba(0, 0, 0, 0.1));
}

.signup-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.signup-title {
    font-size: 22px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.signup-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
    flex: 1;
}

.form-group.half {
    flex: 1;
}

.form-group.small {
    flex: 0.3;
}

.form-group.full-width {
    flex: 1;
    width: 100%;
}

.form-label {
    display: none;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-input:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    outline: none;
}

.form-input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Field-specific colors and styling */
.form-input[type="text"]:focus,
.form-input[name="firstName"]:focus,
.form-input[name="lastName"]:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    background-color: #fff;
}

.form-input[type="email"]:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    background-color: #fff;
}

.form-input[type="password"]:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    background-color: #fff;
}

.form-input[type="tel"]:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    background-color: #fff;
}

/* Searchable dropdown specific styling */
.searchable-input:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    background-color: #fff;
}

/* Field type indicators */
.form-input[type="text"]:valid,
.form-input[name="firstName"]:valid,
.form-input[name="lastName"]:valid {
    border-left: 4px solid #4f46e5;
}

.form-input[type="email"]:valid {
    border-left: 4px solid #0891b2;
}

.form-input[type="password"]:valid {
    border-left: 4px solid #dc2626;
}

.form-input[type="tel"]:valid {
    border-left: 4px solid #059669;
}

.searchable-input.valid {
    border-left: 4px solid #7c3aed;
}

/* Validation states */
.form-input.valid,
.searchable-input.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.invalid,
.searchable-input.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.warning,
.searchable-input.warning {
    border-color: #f59e0b;
    background-color: #fffbeb;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Field error styling */
.field-error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    margin-left: 2px;
    font-weight: 500;
}

/* Success feedback */
.form-input.valid::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
}

.signup-btn {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.signup-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.signup-btn:disabled {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.login-link {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Footer copyright */
.signup-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #999;
    text-align: center;
}

/* Tablet Responsiveness - Form only with background */
@media (max-width: 1366px) and (min-width: 1025px) {
    body {
        flex-direction: column;
        background-image: url('images/background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: relative;
        min-height: 100vh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(45, 85, 155, 0.85);
        z-index: 1;
    }

    .signup-section {
        order: 1;
        min-height: 100vh;
        padding: 40px;
        background: transparent;
        flex: none;
        width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        display: none; /* Hide hero section on tablets */
    }

    .signup-container {
        max-width: 560px;
        width: 100%;
        padding: 50px 45px 40px 45px;
        transform: translateY(0);
        margin: 0;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 12px;
    }

    .signup-container::before,
    .signup-container::after {
        display: none;
    }

    .logo {
        max-width: 120px;
        width: 100%;
        height: auto;
    }

    .form-input {
        padding: 18px 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    .signup-btn {
        padding: 18px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
    }

    .login-link {
        font-size: 14px;
    }

    .signup-footer {
        position: relative;
        margin-top: 30px;
        transform: none;
        left: auto;
        bottom: auto;
        color: rgba(255, 255, 255, 0.9);
        font-size: 12px;
        text-align: center;
    }

    .signup-footer a {
        color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .signup-container {
        max-width: 500px;
        padding: 45px 35px 35px 35px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group.half,
    .form-group.small {
        flex: 1;
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        background-image: url('images/background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: relative;
        min-height: 100vh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(45, 85, 155, 0.85);
        z-index: 1;
    }

    .signup-section {
        order: 1;
        min-height: 100vh;
        padding: 15px;
        background: transparent;
        flex: none;
        width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        display: none;
    }

    .signup-container {
        max-width: 100%;
        width: 100%;
        padding: 25px 20px 20px 20px;
        transform: translateY(0);
        margin: 0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 12px;
    }

    .signup-container::before,
    .signup-container::after {
        display: none;
    }

    .logo {
        max-width: 70px;
        width: 100%;
        height: auto;
        margin-bottom: 12px;
    }

    .signup-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .signup-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .form-input {
        padding: 14px 12px;
        font-size: 16px;
        border-radius: 8px;
    }

    .signup-btn {
        padding: 14px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 8px;
    }

    .login-link {
        font-size: 12px;
    }

    .signup-footer {
        position: relative;
        margin-top: 20px;
        transform: none;
        left: auto;
        bottom: auto;
        color: rgba(255, 255, 255, 0.9);
        font-size: 10px;
        text-align: center;
    }

    .signup-footer a {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group.half,
    .form-group.small {
        flex: 1;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    body {
        background-attachment: scroll;
    }

    .signup-section {
        padding: 10px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .signup-container {
        padding: 20px 15px 15px 15px;
        border-radius: 10px;
        margin: 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        width: 100%;
        max-width: 100%;
    }

    .logo {
        max-width: 65px;
        margin-bottom: 10px;
    }

    .signup-title {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .signup-subtitle {
        font-size: 11px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-input {
        padding: 12px 10px;
        font-size: 16px;
        border-radius: 6px;
        width: 100%;
    }

    .signup-btn {
        padding: 12px;
        font-size: 13px;
        border-radius: 6px;
        width: 100%;
        margin-bottom: 10px;
    }

    .login-link {
        font-size: 11px;
        margin-top: 10px;
    }

    .signup-footer {
        margin-top: 15px;
        font-size: 9px;
        color: rgba(255, 255, 255, 0.9);
        padding: 0 3px;
        line-height: 1.3;
    }

    .signup-footer a {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .form-row {
        margin-bottom: 10px;
    }

    .form-group.half,
    .form-group.small {
        margin-bottom: 12px;
    }
}

/* For very small screens */
@media (max-width: 360px) {
    .signup-section {
        padding: 8px;
    }

    .signup-container {
        padding: 18px 12px 12px 12px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        border-radius: 8px;
    }
    
    .logo {
        max-width: 60px;
        margin-bottom: 8px;
    }

    .signup-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .signup-subtitle {
        font-size: 10px;
        margin-bottom: 12px;
    }

    .form-group {
        margin-bottom: 10px;
    }
    
    .form-input {
        padding: 11px 8px;
        font-size: 16px;
        border-radius: 5px;
    }

    .signup-btn {
        padding: 11px;
        font-size: 12px;
        border-radius: 5px;
        margin-bottom: 8px;
    }

    .login-link {
        font-size: 10px;
        margin-top: 8px;
    }

    .signup-footer {
        color: rgba(255, 255, 255, 0.9);
        font-size: 8px;
        margin-top: 12px;
        line-height: 1.2;
        padding: 0 2px;
    }

    .signup-footer a {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .form-row {
        margin-bottom: 8px;
    }

    .form-group.half,
    .form-group.small {
        margin-bottom: 10px;
    }
}

/* For tablets in portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        flex-direction: column;
        background-image: url('images/background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: relative;
        min-height: 100vh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(45, 85, 155, 0.85);
        z-index: 1;
    }

    .signup-section {
        order: 1;
        min-height: 100vh;
        padding: 35px;
        background: transparent;
        flex: none;
        width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        display: none;
    }

    .signup-container {
        max-width: 530px;
        width: 100%;
        padding: 45px 40px 35px 40px;
        transform: translateY(0);
        margin: 0;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 12px;
    }

    .signup-container::before,
    .signup-container::after {
        display: none;
    }

    .logo {
        max-width: 110px;
    }

    .form-input {
        padding: 16px 14px;
        font-size: 16px;
    }

    .signup-btn {
        padding: 16px;
        font-size: 15px;
    }

    .signup-footer {
        position: relative;
        margin-top: 25px;
        transform: none;
        left: auto;
        bottom: auto;
        color: rgba(255, 255, 255, 0.9);
        font-size: 11px;
        text-align: center;
    }

    .signup-footer a {
        color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Loading animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .signup-btn {
    background: #ccc;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading .signup-btn::after {
    content: 'Creating Account...';
    animation: pulse 1.5s infinite;
}

/* Focus improvements for accessibility */
.form-input:focus,
.signup-btn:focus,
.login-link a:focus {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .signup-container {
        background: #fff;
        border: 2px solid #000;
    }

    .form-input {
        border-color: #000;
    }

    .signup-btn {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    /* Ensure minimum touch target size */
    .form-input,
    .signup-btn {
        min-height: 44px;
    }

    /* Improve touch interaction */
    .form-input:focus {
        transform: none;
        transition: none;
    }

    /* Better mobile typography */
    .signup-container {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Prevent horizontal scroll */
    .signup-section,
    .signup-container,
    .form-input,
    .signup-btn {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Password toggle styling */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-toggle:hover {
    color: #dc2626;
    background-color: #fef2f2;
}

.password-toggle:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Password strength indicator */
.password-strength {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-strength.weak {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.password-strength.medium {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.password-strength.strong {
    background-color: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

/* Status message styling */
.status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.status-message.success {
    background-color: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.status-message.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-message.info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .signup-section {
        padding: 10px;
    }

    .signup-container {
        padding: 15px 20px;
        margin: 5px 0;
    }

    .logo {
        max-width: 60px;
        margin-bottom: 8px;
    }

    .signup-title {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .signup-subtitle {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-input {
        padding: 10px 12px;
    }

    .signup-btn {
        padding: 10px;
        margin-bottom: 8px;
    }
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: all 0.3s ease;
    cursor: text;
    font-weight: 500;
}

.searchable-input:focus {
    border-color: #a0a0a0;
    box-shadow: none;
    outline: none;
}

.searchable-input.has-value {
    color: #333;
    background-color: #faf5ff;
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
    transition: transform 0.3s ease;
}

.dropdown-arrow i {
    font-size: 12px;
}

.searchable-dropdown.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-list {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #7c3aed;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    scrollbar-width: thin;
    scrollbar-color: #7c3aed #f3f4f6;
}

/* Custom scrollbar for webkit browsers */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: #a855f7;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

.searchable-dropdown.open .dropdown-list {
    display: block;
}

.dropdown-item {
    /* Button reset */
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: white;
    outline: none;
    
    /* Layout */
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin: 0;
    box-sizing: border-box;
    text-align: left;
    
    /* Typography */
    font-family: inherit;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    
    /* Interaction */
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.15s ease;
    
    /* Mobile touch improvements */
    -webkit-tap-highlight-color: rgba(124, 58, 237, 0.3);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-height: 48px;
}

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

.dropdown-item:hover {
    background-color: #ede9fe;
    color: #7c3aed;
    border-left: 3px solid #7c3aed;
    padding-left: 13px;
}

/* Light red hover when another item is already selected */
.dropdown-list:has(.dropdown-item.selected) .dropdown-item:not(.selected):hover {
    background-color: #fee2e2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
}

/* Active state for touch devices */
.dropdown-item:active {
    background-color: #ddd6fe;
    color: #7c3aed;
    transform: scale(0.99);
    border-left: 3px solid #7c3aed;
}

.dropdown-item:active .item-text {
    background-color: #ddd6fe;
}

.dropdown-item.selected {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    font-weight: 600;
    border-left: 3px solid #5b21b6;
}

/* Keep selected item purple on hover */
.dropdown-item.selected:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    border-left: 3px solid #5b21b6;
}

.dropdown-item.highlighted {
    background-color: #ede9fe;
    color: #7c3aed;
}

.dropdown-item.highlighted .item-text {
    padding-left: 20px;
}

.dropdown-item.no-results,
.dropdown-item.loading-item {
    color: #999;
    font-style: italic;
    cursor: default;
    text-align: center;
    min-height: auto;
    justify-content: center;
}

.dropdown-item.no-results .item-text,
.dropdown-item.loading-item .item-text {
    justify-content: center;
    padding: 16px 14px;
}

.dropdown-item.no-results:hover,
.dropdown-item.loading-item:hover,
.dropdown-item.no-results:active,
.dropdown-item.loading-item:active {
    background-color: transparent;
    transform: none;
}

.dropdown-item.no-results:hover .item-text,
.dropdown-item.loading-item:hover .item-text {
    padding-left: 14px;
}

.dropdown-item.selected {
    font-weight: 600;
}

/* Validation states for searchable dropdown */
.form-group .searchable-input.valid {
    border-color: #28a745;
    background-color: #f8fff9;
}

.form-group .searchable-input.invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.form-group .searchable-input.warning {
    border-color: #ffc107;
    background-color: #fffef7;
}

/* Field error styling */
.field-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    margin-left: 2px;
}

/* Scroll indicator for long lists */
.dropdown-list.has-scroll::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.1));
    pointer-events: none;
    border-radius: 0 0 4px 4px;
}

/* Responsive adjustments for searchable dropdown */
@media (max-width: 768px) {
    .dropdown-list {
        max-height: 180px;
    }
    
    .dropdown-item {
        padding: 14px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .searchable-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 40px 14px 12px;
    }
    
    /* Larger scrollbar on mobile */
    .dropdown-list::-webkit-scrollbar {
        width: 8px;
    }
}

@media (max-width: 480px) {
    .dropdown-list {
        max-height: 160px;
    }
    
    .dropdown-item {
        padding: 12px 10px;
    }
    
    .searchable-input {
        padding: 12px 36px 12px 10px;
    }
    
    .dropdown-arrow {
        right: 10px;
    }
    
    /* Even larger scrollbar on small screens */
    .dropdown-list::-webkit-scrollbar {
        width: 10px;
    }
}

/* High contrast mode for searchable dropdown */
@media (prefers-contrast: high) {
    .searchable-input {
        border-color: #000;
    }
    
    .dropdown-list {
        border-color: #000;
    }
    
    .dropdown-item.selected {
        background-color: #000;
        color: #fff;
    }
}

/* Reduced motion for searchable dropdown */
@media (prefers-reduced-motion: reduce) {
    .dropdown-arrow,
    .dropdown-item {
        transition: none !important;
    }
}