/* Ensure the entire page takes up at least the viewport height */
html, body {
    overflow-y: auto !important;
    background-color: #f5eee9 !important;
    margin: 0;
    height: 100%;
    margin: 0;
}

/* From https://saol.ai/ (nav.php, line ~67) */
#wrapper.wrap {
    background-color: #f5eee9 !important;
    /*min-height: 80vh !important;
    max-height: 227vh !important;*/
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* From https://saol.ai/, about.php, page-privacy.php, page-terms.php, register.php (gdpr-handler.php, line ~96) */
/* Deduplicated GDPR modal styles */
.gdpr-modal {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 800px;
    background: #fff;
    color: #222;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.gdpr-modal--visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 480px) {
    .gdpr-modal {
        bottom: 20px;
        width: 95vw;
        padding: 1rem 0.75rem;
    }
}

/* Legacy modal dialog for backwards compatibility */
.modal-dialog-custom {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-height: 200px;
    display: flex;
    align-items: flex-end;
}

.class-1 {
    display: none;
}

.class-2 {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.class-3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}

.class-4 {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.class-5 {
    padding: 8px 16px;
    background: #178d72;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

    .class-5:hover {
        background: #126b55;
    }

.class-6 {
    padding: 8px 16px;
    background: #ffffff;
    color: #178d72;
    border: 1px solid #178d72;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

    .class-6:hover {
        background: #f0f0f0;
    }

/* From https://saol.ai/ (foot.php, line ~19) */
.footer-bg {
    background-color: #000000 !important;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    z-index: 1000;
}

/* From https://saol.ai/, page-privacy.php, page-terms.php, register.php (footer2.php, line ~7) */
.uc-footer {
    background-color: #000000 !important;
}

.footer-outer {
    background-color: #000000 !important;
}

.footer-container {
    background-color: #000000 !important;
    padding: 15px;
}

/* From https://saol.ai/about.php (about.php, line ~17) */
.about-content p {
    text-align: left !important;
}

/* From https://saol.ai/about.php (about.php, line ~37) */
.star-left {
    top: 40% !important;
    left: 24% !important;
}

/* From https://saol.ai/about.php (about.php, line ~41) */
.star-right {
    top: 40% !important;
    right: 24% !important;
}

/* From https://saol.ai/about.php (about.php, line ~217) */
.star-bottom-left {
    bottom: -4% !important;
    left: 28% !important;
}

/* From https://saol.ai/about.php (about.php, line ~361) */
.star-bottom-right {
    bottom: 40% !important;
    right: 24% !important;
}

/* From https://saol.ai/about.php (about.php, line ~441) */
.star-bottom-left-cta {
    bottom: 40% !important;
    left: 24% !important;
}

/* From burger.css */
@import url(https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,300..700;1,300..700&family=Inter:wght@300..700&family=IBM+Plex+Sans+Arabic:wght@400;500;700&display=swap);

@font-face {
    font-family: "Mabry Pro";
    src: local("Mabry Pro Bold"), url('../fonts/mabry-pro/MabryPro-Bold.woff2'), url('../fonts/mabry-pro/MabryPro-Bold.woff');
    font-weight: 700;
    text-rendering: optimizeLegibility;
    font-display: swap;
    ascent-override: 90%;
}

/* Navbar styles with increased specificity */
nav.navbar {
    background-color: #f3eee9;
    font-family: 'Mabry Pro', sans-serif;
    font-weight: 700;
    padding: 10px 20px;
    position: relative;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

    nav.navbar .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    nav.navbar .logo {
        display: flex;
        align-items: center;
    }

        nav.navbar .logo img {
            height: 34px;
            width: auto;
        }

    /* Desktop nav */
    nav.navbar .nav-links {
        display: flex;
        justify-content: flex-end;
        list-style: none;
        margin: 0;
        padding: 0;
    }

        nav.navbar .nav-links li {
            margin-left: 20px;
        }

        nav.navbar .nav-links a {
            text-decoration: none;
            color: #000;
            font-size: 18px;
            font-weight: bold;
            transition: color 0.2s;
        }

            nav.navbar .nav-links a:hover {
                color: #178d72;
            }

    /* Hamburger */
    nav.navbar button#hamburger.hamburger {
        display: none !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 34px !important;
        height: 24px !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

        nav.navbar button#hamburger.hamburger span.hamburger-bar {
            display: block !important;
            height: 4px !important;
            width: 100% !important;
            background: #000 !important;
            margin: 4px 0 !important;
            border-radius: 2px !important;
            transition: all 0.3s ease !important;
            opacity: 1 !important;
            visibility: visible !important;
            position: relative !important;
            z-index: 1002 !important;
        }

    /* Hamburger animation */
    nav.navbar .hamburger.active .hamburger-bar:nth-child(1) {
        transform: translateY(10px) rotate(45deg) !important;
    }

    nav.navbar .hamburger.active .hamburger-bar:nth-child(2) {
        opacity: 0 !important;
    }

    nav.navbar .hamburger.active .hamburger-bar:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg) !important;
    }

    /* Mobile menu (hidden by default) */
    nav.navbar .mobile-menu {
        display: none;
        flex-direction: column;
        background-color: #f5eee9;
        opacity: 0.95;
        width: 220px;
        position: absolute;
        top: 100%;
        left: 20px;
        padding: 20px;
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-radius: 8px;
    }

        nav.navbar .mobile-menu.show {
            display: flex !important;
        }

        nav.navbar .mobile-menu a {
            color: #333;
            text-decoration: none;
            padding: 0.8rem 0;
            display: block;
            font-size: 18px;
            font-family: 'Mabry Pro', sans-serif;
            font-weight: 700;
            transition: color 0.2s;
        }

            nav.navbar .mobile-menu a:hover {
                color: #178d72;
            }

/* Media query for responsive design */
@media screen and (max-width: 768px) {
    nav.navbar .nav-links {
        display: none !important;
    }

    nav.navbar button#hamburger.hamburger {
        display: flex !important;
    }

    nav.navbar .mobile-menu.show {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    nav.navbar .nav-links {
        display: flex !important;
    }

    nav.navbar .hamburger {
        display: none !important;
    }

    nav.navbar .mobile-menu {
        display: none !important;
    }
}

/* IMPROVED MODAL CSS - Consolidated and Enhanced */

/* Modal base styling - hidden by default */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

    /* Modal show state */
    .modal.modal-show {
        display: block !important;
        opacity: 1;
    }

    /* Modal hide state */
    .modal.modal-hide {
        display: none !important;
        opacity: 0;
    }

/* Modal fade in animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

/* Modal content */
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.modal-show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header */
.modal-header {
    background: linear-gradient(135deg, #3CB4E5, #845EC2);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
    }

/* Modal body */
.modal-body {
    padding: 2rem;
}

/* Close button */
.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

    .close:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    .close:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }

/* Form group visibility classes */
.form-group {
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

    .form-group.form-group-hide {
        display: none !important;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }

    .form-group.form-group-show {
        display: block !important;
        opacity: 1;
        max-height: 200px;
    }

/* Form styling */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: #374151;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

    .form-control:focus, .form-select:focus {
        border-color: #3CB4E5;
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(60, 180, 229, 0.25);
        transform: translateY(-1px);
    }

    .form-control:invalid {
        border-color: #dc3545;
    }

        .form-control:invalid:focus {
            border-color: #dc3545;
            box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
        }

/* Button styling */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }

.btn-primary {
    background: linear-gradient(135deg, #3CB4E5, #845EC2);
    color: white;
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(60, 180, 229, 0.3);
        color: white;
        text-decoration: none;
    }

.btn-outline-primary {
    background: transparent;
    border: 2px solid #3CB4E5;
    color: #3CB4E5;
}

    .btn-outline-primary:hover:not(:disabled) {
        background: #3CB4E5;
        color: white;
        text-decoration: none;
    }

.btn-success {
    background: #28a745;
    color: white;
}

    .btn-success:hover:not(:disabled) {
        background: #218838;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
        color: white;
        text-decoration: none;
    }

.btn-danger {
    background: #dc3545;
    color: white;
}

    .btn-danger:hover:not(:disabled) {
        background: #c82333;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
        color: white;
        text-decoration: none;
    }

.btn-warning {
    background: #ffc107;
    color: #212529;
}

    .btn-warning:hover:not(:disabled) {
        background: #e0a800;
        transform: translateY(-2px);
        color: #212529;
        text-decoration: none;
    }

/* Small buttons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Utility classes */
.d-flex {
    display: flex !important;
}

.gap-3 {
    gap: 1rem !important;
}

.text-center {
    text-align: center !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Loading spinner */
.ri-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Alert styling */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Table styling for share details */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

    .table th,
    .table td {
        padding: 0.75rem;
        vertical-align: top;
        border-top: 1px solid #dee2e6;
        text-align: left;
    }

    .table thead th {
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        font-weight: 600;
        color: #495057;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .d-flex {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

        .btn:last-child {
            margin-bottom: 0;
        }
}

/* Animation improvements */
@media (prefers-reduced-motion: no-preference) {
    .modal {
        transition: opacity 0.3s ease;
    }

    .modal-content {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .form-group {
        transition: all 0.3s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content,
    .form-group {
        transition: none;
    }

    .ri-spin {
        animation: none;
    }
}

/* SHARE REPORT PAGE STYLES - Higher Specificity */
body.share-report-page {
    background-color: #ffffff !important;
    color: #212529 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.6 !important;
}

html body.share-report-page {
    background-color: #ffffff !important;
}

body.share-report-page .dashboard-header {
    background: linear-gradient(135deg, #3CB4E5 0%, #845EC2 100%) !important;
    color: white !important;
    padding: 2rem 0 !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

body.share-report-page .header-content {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    flex-wrap: wrap !important;
}

body.share-report-page .header-icon {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
}

    body.share-report-page .header-icon i {
        font-size: 32px !important;
        color: white !important;
    }

body.share-report-page .welcome-text h1 {
    margin: 0 !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: white !important;
}

body.share-report-page .welcome-text p {
    margin: 0.3rem 0 0 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

body.share-report-page .main-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

body.share-report-page .card {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #dee2e6 !important;
    margin-bottom: 2rem !important;
}

body.share-report-page .card-header {
    background: linear-gradient(135deg, #3CB4E5, #845EC2) !important;
    color: white !important;
    padding: 1.5rem !important;
    border-radius: 12px 12px 0 0 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

body.share-report-page .card-body {
    padding: 2rem !important;
}

body.share-report-page .card-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: white !important;
}

body.share-report-page .report-item {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

    body.share-report-page .report-item h5 {
        margin: 0 0 0.5rem 0 !important;
        color: #3CB4E5 !important;
        font-weight: 600 !important;
    }

body.share-report-page .report-meta {
    font-size: 0.875rem !important;
    color: #6c757d !important;
    margin-bottom: 1rem !important;
}

body.share-report-page .share-item {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    padding: 1rem !important;
    margin: 0.5rem 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

body.share-report-page .share-info h6 {
    margin: 0 0 0.25rem 0 !important;
    color: #343a40 !important;
    font-weight: 600 !important;
}

body.share-report-page .share-stats {
    font-size: 0.875rem !important;
    color: #6c757d !important;
}

body.share-report-page .share-actions {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

body.share-report-page .status-badge {
    padding: 0.25rem 0.75rem !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

body.share-report-page .status-enabled {
    background: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

body.share-report-page .status-disabled {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

body.share-report-page .btn {
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

body.share-report-page .btn-primary {
    background: linear-gradient(135deg, #3CB4E5, #845EC2) !important;
    color: white !important;
}

    body.share-report-page .btn-primary:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(60, 180, 229, 0.3) !important;
        color: white !important;
        text-decoration: none !important;
    }

body.share-report-page .btn-success {
    background: #28a745 !important;
    color: white !important;
}

body.share-report-page .btn-danger {
    background: #dc3545 !important;
    color: white !important;
}

body.share-report-page .btn-warning {
    background: #ffc107 !important;
    color: #212529 !important;
}

body.share-report-page .btn-outline-primary {
    background: transparent !important;
    border: 2px solid #3CB4E5 !important;
    color: #3CB4E5 !important;
}

    body.share-report-page .btn-outline-primary:hover {
        background: #3CB4E5 !important;
        color: white !important;
        text-decoration: none !important;
    }

body.share-report-page .btn-sm {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
}

body.share-report-page .alert {
    border-radius: 8px !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.5rem !important;
}

body.share-report-page .alert-success {
    background: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
    border-left: 4px solid #28a745 !important;
}

body.share-report-page .alert-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    border-left: 4px solid #dc3545 !important;
}

body.share-report-page .empty-state {
    text-align: center !important;
    padding: 3rem 1rem !important;
    color: #6c757d !important;
}

    body.share-report-page .empty-state i {
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
        color: #3CB4E5 !important;
    }

    body.share-report-page .empty-state h4 {
        color: #343a40 !important;
        margin-bottom: 1rem !important;
    }

body.share-report-page .mt-3 {
    margin-top: 1rem !important;
}

body.share-report-page .d-flex {
    display: flex !important;
}

body.share-report-page .gap-3 {
    gap: 1rem !important;
}

@media (max-width: 768px) {
    body.share-report-page .share-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    body.share-report-page .share-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }

    body.share-report-page .header-content {
        flex-direction: column !important;
        text-align: center !important;
    }
}
