/*
 * GiftSwap Africa Dashboard Premium Styles
 * Matches the geometric, cosmic dark mode layout
 */

:root {
    --giftswap-bg-dark: #111111;
    --giftswap-card-dark: #1a1a1a;
    --giftswap-orange: #f97316;
    --giftswap-orange-hover: #ea580c;
    --giftswap-border: rgba(255, 255, 255, 0.08);
    --giftswap-text-muted: rgba(255, 255, 255, 0.6);
}

/* Base layouts */
.giftswap-app-container {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background-color: var(--giftswap-bg-dark);
}

/* Sidebar definitions */
.sidebar-nav-btn {
    border-radius: 0px;
    border-right-width: 2px;
}

.sidebar-nav-btn.active {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--giftswap-orange) !important;
    border-right-color: var(--giftswap-orange);
    font-weight: 700;
}

/* Custom panels toggles */
.dashboard-panel.hidden {
    display: none !important;
}

/* Geometric elements styling */
.giftswap-modal {
    transition: opacity 0.25s ease;
}

.giftswap-modal.hidden {
    display: none !important;
}

/* Scrollbar customizations */
.giftswap-app-container ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
.giftswap-app-container ::-webkit-scrollbar-track {
    background: var(--giftswap-bg-dark);
}
.giftswap-app-container ::-webkit-scrollbar-thumb {
    background: #262626;
}
.giftswap-app-container ::-webkit-scrollbar-thumb:hover {
    background: var(--giftswap-orange);
}

/* Flexbox and grids helper fallbacks if Tailwind is enqueued lightly */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.hidden { display: none; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-20 { z-index: 20; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-7 { grid-column: span 7 / span 7; }
    .lg\:col-span-12 { grid-column: span 12 / span 12; }
}

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.rounded-sm { border-radius: 2px; }
.border { border: 1px solid var(--giftswap-border); }
.border-b { border-bottom: 1px solid var(--giftswap-border); }
.bg-zinc-950 { background-color: var(--giftswap-bg-dark); }
.bg-zinc-900 { background-color: var(--giftswap-card-dark); }
.text-white { color: #ffffff; }
.text-orange-400 { color: var(--giftswap-orange); }
.text-emerald-400 { color: #10b981; }

/* Custom mockup matches */
.mono {
    font-family: 'JetBrains Mono', monospace;
}
.bg-main {
    background-color: var(--giftswap-bg-dark);
}
.bg-card {
    background-color: var(--giftswap-card-dark);
}
.border-dim {
    border-color: rgba(255, 255, 255, 0.1);
}
.text-muted {
    color: rgba(255, 255, 255, 0.6);
}
.stat-pill {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: #f97316;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.dashicons {
    vertical-align: middle;
}

/* Offset sticky header when admin bar is present */
.admin-bar header.sticky,
.admin-bar .sticky {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar header.sticky,
    .admin-bar .sticky {
        top: 46px !important;
    }
}

/* Mobile/Tablet sidebar responsive overrides */
@media (max-width: 1023px) {
    #giftswap-sidebar {
        display: none !important;
    }
    #giftswap-sidebar.mobile-open {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px !important;
        height: 100vh !important;
        z-index: 50 !important;
        box-shadow: 8px 0 25px rgba(0, 0, 0, 0.8) !important;
        animation: slideIn 0.25s ease-out forwards;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Custom WordPress Customizer Logo Styles */
.custom-logo-link {
    display: inline-block !important;
}
.custom-logo-link img {
    height: 2rem !important; /* 32px matching h-8 */
    width: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
}

@media (max-width: 1023px) {
    .custom-logo-link img {
        height: 1.75rem !important; /* 28px matching h-7 */
    }
}

/* Full-screen GiftSwap dashboard override */
body.page-template-page-p2p-dashboard,
body.page-template-page-p2p-dashboard html,
body.page-template-page-p2p-dashboard body,
body.page-template-page-p2p-dashboard #page,
body.page-template-page-p2p-dashboard .site,
body.page-template-page-p2p-dashboard .site-main,
body.page-template-page-p2p-dashboard .site-content,
body.page-template-page-p2p-dashboard .content-area,
body.page-template-page-p2p-dashboard #content,
body.page-template-page-p2p-dashboard .wrap,
body.page-template-page-p2p-dashboard .container,
body.page-template-page-p2p-dashboard .giftswap-app-container {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

body.page-template-page-p2p-dashboard .giftswap-app-container {
    min-height: 100vh !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

body.page-template-page-p2p-dashboard .giftswap-app-container > * {
    min-width: 0;
}

body.page-template-page-p2p-dashboard header#masthead,
body.page-template-page-p2p-dashboard footer#colophon,
body.page-template-page-p2p-dashboard .site-footer,
body.page-template-page-p2p-dashboard .site-header,
body.page-template-page-p2p-dashboard nav.main-navigation {
    display: none !important;
}
