@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('./variables.css');
@import url('../css/sidebar.css');
@import url('../css/header.css');
@import url('../css/badge.css');
@import url('../css/modal.css');

/* ============================================================
   PAGE-SPECIFIC STYLESHEETS
   ============================================================ */
@import url('../../pages/calendar/calendar.css');
@import url('../../pages/dashboard/dashboard.css');
@import url('../../pages/weddings/weddings.css');
/* @import url('../../pages/events/events.css');
@import url('../../pages/users/users.css'); */
@import url('../../pages/hosts/hosts.css');

@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="email"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ============================================================
   GLOBAL VIEWPORT LOCK & RESETS
   ============================================================ */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-family-base, 'Inter', sans-serif);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    overscroll-behavior-y: none;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ============================================================
   APP SHELL & LAYOUT ARCHITECTURE
   ============================================================ */
#layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    background-color: var(--color-bg);
}

#right-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

#header-container {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

#main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 24px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    #main-content {
        padding: 16px;
        padding-bottom: 120px !important;
    }
}

/* Legacy App Shell Helpers */
.app-shell {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--color-bg);
}

.app-shell__main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.app-shell__content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .app-shell { position: relative; }
    .app-shell__main { width: 100%; }
}

/* ============================================================
   ENHANCED UI POLISHING & UTILITIES
   ============================================================ */
.stat-card {
    background: var(--color-white) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md);
    transition: transform var(--transition-base, 0.2s ease), border-color var(--transition-base, 0.2s ease);
}

.stat-card:hover {
    border-color: var(--color-border-strong) !important;
    transform: translateY(-2px);
}

button, .btn {
    cursor: pointer;
    font-family: inherit;
    transition: background-color var(--transition-fast, 0.15s ease), transform 100ms ease;
}

button:active {
    transform: scale(0.98);
}

::-webkit-scrollbar { 
    width: 6px; 
    height: 6px; 
}

::-webkit-scrollbar-track { 
    background: var(--color-bg); 
}

::-webkit-scrollbar-thumb { 
    background: var(--color-border-strong); 
    border-radius: 3px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: var(--color-primary-dark, var(--color-primary)); 
}

/* Ensure the mobile bottom navigation sits below modal overlays */
.bottom-nav {
  z-index: 990 !important;
}

/* Ensure modal overlays, backdrops, and SweetAlert containers cover everything */
.modal-backdrop,
.modal-overlay,
.swal2-container {
  z-index: 9999 !important;
  pointer-events: auto !important;
}

/* When a modal is open, prevent scrolling and background clicks on mobile */
body.modal-open,
body.swal2-shown {
  overflow: hidden !important;
  touch-action: none !important;
}

body.modal-open .bottom-nav,
body.swal2-shown .bottom-nav {
  pointer-events: none !important;
}