﻿/* ✅ إعدادات عامة */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Cairo', sans-serif;
    background-color: #fff8e7;
}

/* ✅ حاوية الصفحة */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== هيدر موحد (Blazor + Identity) ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, #ffcc70, #ff8c42);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 4px solid #ff6b6b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

    .main-header .logo {
        font-size: 30px;
        font-weight: bold;
        color: white;
        text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
        white-space: nowrap;
        margin-right: 40px;
    }

/* زر قائمة الموبايل */
.menu-toggle {
    background: none;
    border: none;
    font-size: 26px;
    color: white;
    cursor: pointer;
    display: none;
}

/* روابط الهيدر */
.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

    .nav-links a {
        text-decoration: none;
        background: rgba(255,255,255,0.2);
        color: white;
        padding: 8px 15px;
        border-radius: 12px;
        font-weight: bold;
        font-size: 16px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: background 0.3s ease, color 0.3s ease;
    }

        .nav-links a:hover {
            background: white;
            color: #ff6b6b;
            box-shadow: 0 0 5px rgba(0,0,0,0.1);
        }

/* ===== محتوى الصفحة ===== */
.main-layout {
    padding-top: 130px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    box-sizing: border-box;
}

    .main-content.with-sidebar {
        padding-right: 230px;
    }

/* ===== الشريط الجانبي ===== */
.sidebar-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 210px;
    background-color: #fff3cd;
    padding: 25px 15px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

/* ===== الفوتر ===== */
.site-footer {
    background: linear-gradient(to right, #ffe0b2, #ffcc80);
    padding: 20px;
    text-align: center;
    font-size: 16px;
    color: #444;
    border-top: 2px dashed #ff9800;
    direction: rtl;
    border-radius: 12px 12px 0 0;
    font-family: 'Cairo', sans-serif;
    margin-top: auto;
}

.footer-content p {
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 17px;
}

.footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    flex-wrap: wrap;
}

    .footer-icons img {
        width: 32px;
        height: 32px;
        transition: transform 0.3s ease;
        cursor: pointer;
        filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
    }

        .footer-icons img:hover {
            transform: scale(1.2) rotate(6deg);
        }

/* ===== دعم الشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-header .nav-links {
        display: none;
    }

        .main-header .nav-links.show {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 85px;
            right: 30px;
            background: linear-gradient(to right, #ffcc70, #ff8c42);
            border-radius: 8px;
            padding: 16px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1001;
            min-width: 180px;
            max-width: 200px;
        }

            .main-header .nav-links.show a {
                background-color: #ffcc80;
                color: #333;
                padding: 10px 14px;
                margin: 6px 0;
                border-radius: 8px;
                font-size: 16px;
                text-align: center;
                display: block;
                width: 100%;
                box-sizing: border-box;
                font-weight: bold;
            }

                .main-header .nav-links.show a:last-child {
                    margin-bottom: 0;
                }
  

    /* ✅ زيادة المسافة تحت الهيدر لمنع التراكب */
    .main-layout {
        padding-top: 100px !important;
    }

    .main-content.with-sidebar {
        padding-right: 0;
    }

    .sidebar-nav {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
        border-bottom: 2px solid #ffcc80;
    }
}

/* ===== إخفاء زر القائمة في صفحات Identity ===== */
.identity-page .menu-toggle {
    display: none !important;
}

/* ===== إخفاء رسالة الخطأ من Blazor ===== */
#blazor-error-ui {
    display: none !important;
}
