/* ========================================
   comtirbimeh - Main Stylesheet
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #F8FAFC;
    color: #0F172A;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #94A3B8; border-radius: 10px; }

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(11, 18, 32, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Card hover lift */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
}

/* Gradient button */
.btn-gradient {
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-gradient:hover {
    background: linear-gradient(135deg, #1D4ED8, #4338CA);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}
.btn-gradient:active {
    transform: translateY(0);
}
.btn-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-gradient:hover::after {
    opacity: 1;
}

/* Input focus glow */
.input-glow:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Neon highlight */
.neon-glow {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}
.neon-glow:focus {
    box-shadow: 0 0 25px rgba(34, 211, 238, 0.2);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Slide up animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Scale in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.3s ease forwards;
}

/* Step indicator */
.step-indicator .step-item.active .step-circle {
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.step-indicator .step-item.completed .step-circle {
    background: #10B981;
}

/* Toast notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: toastIn 0.4s ease forwards;
    min-width: 280px;
    text-align: center;
    direction: rtl;
}

.toast-success { background: linear-gradient(135deg, #059669, #10B981); }
.toast-error { background: linear-gradient(135deg, #DC2626, #EF4444); }
.toast-info { background: linear-gradient(135deg, #2563EB, #3B82F6); }

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

/* Bottom Navigation */
.bottom-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.bottom-nav-item.active {
    color: #2563EB;
}

.bottom-nav-item.active .nav-icon {
    transform: scale(1.1);
}

.bottom-nav-item .nav-pill {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: all 0.3s ease;
}

.bottom-nav-item.active .nav-pill {
    opacity: 1;
}

/* Page transitions */
.page-enter {
    animation: pageEnter 0.35s ease forwards;
}

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

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E2E8F0;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Shimmer effect for skeleton cards */
.shimmer-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.shimmer-line {
    height: 14px;
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 6px;
}

/* Pulse ring for active states */
.pulse-ring {
    position: relative;
}
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid #2563EB;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0; }
}

/* Check animation */
.check-animation {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #10B981);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes checkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Select custom styling */
select.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 36px;
}

/* Custom file upload */
.file-upload-zone {
    border: 2px dashed #CBD5E1;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.file-upload-zone:hover {
    border-color: #2563EB;
    background: rgba(37, 99, 235, 0.03);
}

/* Success page */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}
.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #10B981);
    box-sizing: content-box;
}
.success-checkmark .check-icon::before {
    display: none;
}
.success-checkmark .check-icon .icon-line {
    height: 5px;
    background-color: white;
    display: block;
    border-radius: 10px;
    position: absolute;
}
.success-checkmark .check-icon .icon-line.line-tip {
    width: 25px;
    transform: rotate(45deg);
    top: 46px;
    left: 14px;
    animation: icon-line-tip 0.5s 0.2s ease forwards;
}
.success-checkmark .check-icon .icon-line.line-long {
    width: 47px;
    transform: rotate(-45deg);
    top: 38px;
    left: 22px;
    animation: icon-line-long 0.5s 0.3s ease forwards;
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    100% { width: 25px; left: 14px; top: 46px; }
}
@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    100% { width: 47px; right: 8px; top: 40px; }
}
