/* ===================================
   Basma Login System - Responsive CSS
   =================================== */

/* Root Variables */
:root {
    --basma-primary: #14b8a6;
    --basma-primary-light: #22d3ee;
    --basma-primary-lighter: #67e8f9;
    --basma-dark: #0a1628;
    --basma-dark-blue: #0d2847;
    --basma-teal: #1a4d5c;
    --basma-gradient: linear-gradient(135deg, #14b8a6 0%, #22d3ee 50%, #67e8f9 100%);
}

/* Layout Root */
.basma-login-root {
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Language Selector */
.basma-language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Main Container */
.basma-login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--basma-dark) 0%, var(--basma-dark-blue) 30%, var(--basma-teal) 60%, #2d7d8f 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Background Pattern */
.basma-background-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* Bokeh Effects */
.basma-bokeh {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: basmaFloat 15s infinite ease-in-out;
}

.basma-bokeh-1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.7) 0%, transparent 70%);
    top: 10%;
    right: 15%;
}

.basma-bokeh-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.5) 0%, transparent 70%);
    bottom: 10%;
    left: 10%;
    animation-delay: 5s;
}

.basma-bokeh-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.6) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes basmaFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.15);
    }

    50% {
        transform: translate(-30px, 40px) scale(0.85);
    }

    75% {
        transform: translate(30px, 30px) scale(1.05);
    }
}

/* Animated Fingerprint Backgrounds */
.basma-fingerprint-animated {
    position: absolute;
    opacity: 0.8;
}

.basma-fingerprint-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    right: -150px;
    animation: basmaRotateSlow 45s linear infinite;
}

.basma-fingerprint-2 {
    width: 500px;
    height: 500px;
    bottom: -80px;
    left: -100px;
    animation: basmaRotateSlow 60s linear infinite reverse;
}

@keyframes basmaRotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Login Wrapper */
.basma-login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
}

/* Login Card */
.basma-login-card {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px);
    border-radius: 24px !important;
    padding: 35px 25px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

/* Logo Section */
.basma-logo-section {
    text-align: center;
    margin-bottom: 25px;
}

.basma-logo-svg-container {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.basma-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 12px rgba(20, 184, 166, 0.3));
}

.basma-brand-text {
    font-size: 26px;
    font-weight: bold;
    color: #0d9488;
    margin-bottom: 5px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.basma-brand-subtitle {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Divider */
.basma-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    margin: 15px auto;
    border-radius: 2px;
}

/* Login Title */
.basma-login-title {
    color: #1e293b !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    font-size: 1.25rem !important;
}

/* Form Content */
.basma-form-content {
    margin-top: 15px;
}

/* Input Labels */
.basma-input-label {
    display: block;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: right;
}

/* MudBlazor Input Field Customization */
.basma-input-field {
    margin-bottom: 18px !important;
}

    .basma-input-field .mud-input-root {
        border-radius: 10px;
    }

    .basma-input-field .mud-input-outlined {
        border-color: #cbd5e1;
        border-width: 1.5px;
    }

        .basma-input-field .mud-input-outlined:hover {
            border-color: #0d9488;
        }

        .basma-input-field .mud-input-outlined.mud-input-adorned-end {
            padding-right: 14px;
        }

    .basma-input-field .mud-input-slot {
        color: #1e293b;
        font-size: 15px;
    }

    .basma-input-field .mud-input-label {
        display: none !important;
    }

/* Login Button */
.basma-login-button {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 13px 20px !important;
    margin-top: 10px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35) !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}

    .basma-login-button span {
        color: white !important;
    }


    .basma-login-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(13, 148, 136, 0.45) !important;
        background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%) !important;
    }

    .basma-login-button:active {
        transform: translateY(0);
    }

/* Footer Text */
.basma-footer-text {
    margin-top: 20px;
    text-align: center;
}

    .basma-footer-text .mud-typography {
        color: rgba(255, 255, 255, 0.8) !important;
    }

/* ===================================
   Mobile Responsive Design
   =================================== */

/* Tablets and below */
@media (max-width: 768px) {
    .basma-login-card {
        padding: 30px 22px !important;
        border-radius: 20px !important;
    }

    .basma-logo-svg-container {
        width: 80px;
        height: 80px;
    }

    .basma-brand-text {
        font-size: 24px;
    }

    .basma-login-title {
        font-size: 1.15rem !important;
    }

    .basma-fingerprint-1 {
        width: 500px;
        height: 500px;
    }

    .basma-fingerprint-2 {
        width: 400px;
        height: 400px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .basma-login-container {
        padding: 12px;
    }

    .basma-login-card {
        padding: 25px 18px !important;
        border-radius: 18px !important;
    }

    .basma-logo-svg-container {
        width: 75px;
        height: 75px;
        margin-bottom: 10px;
    }

    .basma-brand-text {
        font-size: 22px;
    }

    .basma-brand-subtitle {
        font-size: 12px;
    }

    .basma-divider {
        margin: 12px auto;
    }

    .basma-login-title {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }

    .basma-form-content {
        margin-top: 12px;
    }

    .basma-input-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .basma-input-field {
        margin-bottom: 15px !important;
    }

    .basma-login-button {
        padding: 12px 18px !important;
        font-size: 15px !important;
        margin-top: 8px !important;
    }

    .basma-language-selector {
        top: 12px;
        right: 12px;
    }

    .basma-bokeh-1,
    .basma-bokeh-2,
    .basma-bokeh-3 {
        opacity: 0.25;
    }

    .basma-fingerprint-1,
    .basma-fingerprint-2 {
        opacity: 0.6;
    }
}

/* Small mobile phones */
@media (max-width: 360px) {
    .basma-login-card {
        padding: 22px 16px !important;
    }

    .basma-logo-svg-container {
        width: 70px;
        height: 70px;
    }

    .basma-brand-text {
        font-size: 20px;
    }
}

/* PWA Standalone Mode */
@media (display-mode: standalone) {
    .basma-login-container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .basma-login-card {
        padding: 18px !important;
    }

    .basma-logo-svg-container {
        width: 60px;
        height: 60px;
        margin-bottom: 8px;
    }

    .basma-brand-text {
        font-size: 20px;
        margin-bottom: 3px;
    }

    .basma-divider {
        margin: 10px auto;
    }

    .basma-login-title {
        margin-bottom: 12px !important;
        font-size: 1.05rem !important;
    }

    .basma-form-content {
        margin-top: 8px;
    }

    .basma-input-label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .basma-input-field {
        margin-bottom: 12px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .basma-login-card {
        background: rgba(30, 41, 59, 0.95) !important;
    }

    .basma-login-title {
        color: #f1f5f9 !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .basma-login-card {
        border: 2px solid var(--basma-primary);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .basma-fingerprint-animated {
        animation-duration: 120s;
    }

    .basma-bokeh {
        animation-duration: 30s;
    }

    .basma-login-button {
        transition: none !important;
    }
}

/* RTL Support */
[dir="rtl"] .basma-language-selector {
    right: auto;
    left: 20px;
}

[dir="rtl"] .basma-input-field .mud-input-outlined.mud-input-adorned-end {
    padding-right: 0;
    padding-left: 14px;
}
