/* Vispa Leads Custom Styles */

/* Import Cairo font for Arabic */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1976D2;
    --secondary-color: #424242;
    --accent-color: #FF5722;
    --bg-light: #f4f6f9;
    --text-dark: #2c3e50;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #1565C0) !important;
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

/* Cards & Containers */
.container {
    max-width: 900px;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease;
    margin-bottom: 1.5rem;
    background: #fff;
    overflow: hidden;
}

.card-header {
    background-color: #fff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.card-header.bg-primary,
.card-header.bg-success {
    color: #fff !important;
}

.card-body {
    padding: 1.5rem;
}

/* Form Elements - Mobile Optimization */
.form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #fcfcfc;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
    background-color: #fff;
}

.input-group-text {
    border-radius: 10px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
}

/* Buttons - Large Touch Targets */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
}

.btn-primary:hover,
.btn-primary:active {
    background-color: #1565C0;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(21, 101, 192, 0.25);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Full width buttons on mobile */
    .d-flex.justify-content-between {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .d-flex.justify-content-between .btn {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h5 {
        font-size: 1.1rem;
    }
}

/* Floating Label Support Customization */
.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 1.5rem 0;
    margin-top: 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

/* Full-Page Loader Overlay */
.page-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.page-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
}

.page-loader-text {
    margin-top: 1rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .page-loader-spinner {
        width: 40px;
        height: 40px;
    }

    .page-loader-text {
        font-size: 0.9rem;
    }
}
}

/* RTL Support - Cairo font for Arabic */
[dir="rtl"] body,
[dir="rtl"] .form-control,
[dir="rtl"] .form-select,
[dir="rtl"] .btn,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    font-family: 'Cairo', sans-serif;
}