/* ==========================================================================
   1. Font: Vazir
   ========================================================================== */

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Bold.woff2') format('woff2'),
         url('../fonts/vazir/Vazir-Bold.woff') format('woff'),
         url('../fonts/vazir/Vazir-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Regular.woff2') format('woff2'),
         url('../fonts/vazir/Vazir-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. Modern CSS Variables
   ========================================================================== */

:root {
    --primary: #FF9927;
    --primary-light: #FFB860;
    --primary-dark: #E67E00;
    --secondary: #FEC601;
    --accent: #0056b3;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-overlay: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   3. Enhanced Loading Overlay & Modern Spinner
   ========================================================================== */

.loading-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background: var(--bg-overlay);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    background: var(--bg);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    text-align: center;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modern gradient spinner with smooth animation */
.loading-spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

.loading-spinner::before,
.loading-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-spinner::before {
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    filter: drop-shadow(0 0 12px rgba(255, 153, 39, 0.5));
}

.loading-spinner::after {
    inset: 10px;
    border-top-color: var(--secondary);
    border-left-color: var(--secondary);
    animation-duration: 1.8s;
    animation-direction: reverse;
    filter: drop-shadow(0 0 10px rgba(254, 198, 1, 0.4));
}

.loading-spinner span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px var(--primary);
}

.loading-message {
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    opacity: 0.95;
    line-height: 1.5;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* ==========================================================================
   4. Modern Tag Copy with Enhanced Interaction
   ========================================================================== */

.smart-login-tag-copy {
    cursor: copy;
    margin: 2px 4px;
    padding: 4px 8px;
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-light);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-light);
}

.smart-login-tag-copy:hover {
    background: var(--primary-light);
    color: var(--bg);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.smart-login-tag-copy:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ==========================================================================
   5. Modernized Icons with Smooth Hover Effects
   ========================================================================== */

.smart-icon-form,
.smart-icon-notification,
.smart-icon-security,
.smart-icon-merge,
.smart-icon-advanced,
.smart-icon-style,
.smart-icon-poup,
.smart-icon-licence,
.smart-icon-help,
.smart-icon-upload,
.smart-icon-document {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    transition: var(--transition);
    opacity: 0.85;
}

.smart-icon-form:hover,
.smart-icon-notification:hover,
.smart-icon-security:hover,
.smart-icon-merge:hover,
.smart-icon-advanced:hover,
.smart-icon-style:hover,
.smart-icon-poup:hover,
.smart-icon-licence:hover,
.smart-icon-help:hover,
.smart-icon-upload:hover,
.smart-icon-document:hover {
    opacity: 1;
    transform: scale(1.1);
}

.smart-icon-spiner {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Individual icons */
.smart-icon-form { background-image: url("../images/svg/01-forms.svg"); }
.smart-icon-notification { background-image: url("../images/svg/03-notices.svg"); }
.smart-icon-security { background-image: url("../images/svg/04-security.svg"); }
.smart-icon-merge { background-image: url("../images/svg/05-merge.svg"); }
.smart-icon-advanced { background-image: url("../images/svg/06-advanced.svg"); }
.smart-icon-style { background-image: url("../images/svg/07-style.svg"); }
.smart-icon-poup { background-image: url("../images/svg/08-pop-up.svg"); }
.smart-icon-licence { background-image: url("../images/svg/09-licence.svg"); }
.smart-icon-help { background-image: url("../images/svg/10-help.svg"); }
.smart-icon-spiner { background-image: url("../images/svg/ring-resize.svg"); }
.smart-icon-upload { background-image: url("../images/svg/Upload.svg"); }
.smart-icon-document { background-image: url("../images/svg/Document.svg"); }

/* ==========================================================================
   6. Enhanced Typography
   ========================================================================== */

.smart-login-wrap,
.smart-login-wrap h2,
.akgt-tooltip,
.notyf__message,
.notyf-announcer {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.akgt-tooltip {
    line-height: 1.75;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    max-width: 320px;
}

/* ==========================================================================
   7. Input Direction & Modern Form Styling
   ========================================================================== */

.link_login div input {
    direction: ltr;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}

.link_login div input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 153, 39, 0.1);
}

.link_login div input:hover {
    border-color: var(--border);
}

/* ==========================================================================
   8. Utility Classes for Better UX
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Smooth focus indicators for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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