/**
 * Premium Modern Input Styles
 * Creative and elegant form inputs
 */

/* ==========================================
   MODERN INPUT CONTAINER
   ========================================== */
.input-group {
    position: relative;
    margin-bottom: 0;
}

.input-group-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .input-group-double {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* ==========================================
   PREMIUM INPUT FIELD - MINIMAL MODERN
   ========================================== */
.premium-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: none;
    position: relative;
}

.premium-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    transform: none;
}

.premium-input:hover:not(:focus) {
    border-color: #9ca3af;
    box-shadow: none;
}

/* Dark mode inputs for dark backgrounds - MINIMAL */
.premium-input-dark {
    background: #1f2937;
    border: 1px solid #4b5563;
    color: #ffffff;
}

.premium-input-dark:focus {
    border-color: #60a5fa;
    background: #1f2937;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}

.premium-input-dark::placeholder {
    color: #9ca3af;
}

/* ==========================================
   FLOATING LABEL - DISABLED
   ========================================== */
.floating-label {
    display: none;
}

/* ==========================================
   INPUT WITH ICON
   ========================================== */
.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
    z-index: 5;
}

.premium-input:focus ~ .input-icon {
    color: #3b82f6;
    transform: translateY(-50%) scale(1.1);
}

.premium-input-dark:focus ~ .input-icon {
    color: #60a5fa;
}

/* Input with left icon needs padding */
.premium-input.has-icon {
    padding-left: 2.75rem;
}

@media (max-width: 640px) {
    .input-icon {
        left: 0.625rem;
        font-size: 0.875rem;
    }
    
    .premium-input.has-icon {
        padding-left: 2.25rem;
    }
}

/* ==========================================
   COUNTRY CODE SELECT (PREMIUM) - MINIMAL
   ========================================== */
.premium-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    /* NO dropdown arrow - removed for minimal design */
    box-shadow: none;
    font-weight: 400;
}

.premium-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    transform: none;
}

.premium-select:hover:not(:focus) {
    border-color: #9ca3af;
    box-shadow: none;
}

/* Dark version */
.premium-select-dark {
    background: #1f2937;
    border: 1px solid #4b5563;
    color: #ffffff;
    /* NO dropdown arrow */
}

.premium-select-dark:focus {
    border-color: #60a5fa;
    background: #1f2937;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}

/* ==========================================
   PHONE NUMBER GROUP - RTL (Country code on LEFT)
   ========================================== */
.phone-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-direction: row-reverse; /* RTL: Country code on left */
}

.phone-country-code {
    flex: 0 0 7rem;
}

.phone-number {
    flex: 1;
}

@media (max-width: 640px) {
    .phone-country-code {
        flex: 0 0 5.5rem;
    }
    
    .phone-input-group {
        gap: 0.5rem;
    }
}

/* ==========================================
   TEXTAREA PREMIUM - MINIMAL
   ========================================== */
.premium-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 6rem;
    box-shadow: none;
}

.premium-textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* ==========================================
   PASSWORD INPUT WITH TOGGLE
   ========================================== */
.password-toggle-btn {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 10;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-center: center;
}

.password-toggle-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.375rem;
}

.password-toggle-btn i {
    font-size: 0.875rem;
}

.premium-input.has-toggle {
    padding-left: 3rem;
}

@media (max-width: 640px) {
    .password-toggle-btn {
        left: 0.25rem;
        width: 2.25rem;
        height: 2.25rem;
        padding: 0.375rem;
    }
    
    .password-toggle-btn i {
        font-size: 0.8125rem;
    }
    
    .premium-input.has-toggle {
        padding-left: 2.75rem;
    }
}

/* ==========================================
   CHECKBOX PREMIUM
   ========================================== */
.premium-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.premium-checkbox:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.premium-checkbox:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.premium-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 0.3rem;
    top: 0.05rem;
    width: 0.4rem;
    height: 0.7rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ==========================================
   INPUT HELPER TEXT
   ========================================== */
.input-helper {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.input-helper i {
    font-size: 0.875rem;
}

.input-helper.error {
    color: #ef4444;
}

.input-helper.success {
    color: #10b981;
}

/* ==========================================
   PASSWORD STRENGTH INDICATOR
   ========================================== */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bars {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 0.25rem;
    flex: 1;
    background: #e5e7eb;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.strength-bar.active {
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    box-shadow: 0 0 8px currentColor;
}

.strength-bar.active.weak {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.strength-bar.active.medium {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.strength-bar.active.strong {
    background: linear-gradient(90deg, #10b981, #059669);
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: #6b7280;
}

.strength-text.weak { color: #ef4444; }
.strength-text.medium { color: #f59e0b; }
.strength-text.strong { color: #10b981; }

/* ==========================================
   SUBMIT BUTTON PREMIUM - MINIMAL MODERN
   ========================================== */
.premium-submit {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #ffffff;
    background: #3b82f6;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    position: relative;
}

.premium-submit:hover {
    background: #2563eb;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    transform: none;
}

.premium-submit:active {
    background: #1d4ed8;
    transform: scale(0.98);
}

.premium-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Green version for signup */
.premium-submit-green {
    background: #10b981;
}

.premium-submit-green:hover {
    background: #059669;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.premium-submit-green:active {
    background: #047857;
}

/* ==========================================
   LABEL PREMIUM
   ========================================== */
.premium-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
    text-align: right;
}

.premium-label .required {
    color: #ef4444;
    margin-right: 0.25rem;
}

/* ==========================================
   GLASSMORPHISM EFFECT (OPTIONAL)
   ========================================== */
.glass-input {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 640px) {
    .premium-input,
    .premium-select,
    .premium-textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
        padding: 0.75rem 0.75rem;
    }
    
    .premium-input.has-icon {
        padding-right: 0.75rem;
        padding-left: 2.25rem;
    }
    
    .premium-input.has-toggle {
        padding-right: 0.75rem;
        padding-left: 2.75rem;
    }
    
    .premium-submit {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .premium-label {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .input-helper {
        font-size: 0.6875rem;
        margin-top: 0.375rem;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.premium-input.loading {
    background: linear-gradient(90deg, #f9fafb 0%, #e5e7eb 50%, #f9fafb 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ==========================================
   FOCUS VISIBLE FOR ACCESSIBILITY
   ========================================== */
.premium-input:focus-visible,
.premium-select:focus-visible,
.premium-checkbox:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

