/**
 * WaitN Design System - Base Styles
 * Reset and foundational styles
 */

/* ========================================
   CSS RESET
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--wn-font-family);
    font-size: var(--wn-text-base);
    line-height: var(--wn-line-height-normal);
    color: var(--wn-text-primary, var(--wn-gray-900));
    background-color: var(--wn-bg-app, var(--wn-white));
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ========================================
   APP CONTAINER
   ======================================== */
.wn-app {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background-color: var(--wn-bg-app);
    color: var(--wn-text-primary);
}

.wn-app-content {
    flex: 1;
    padding: var(--wn-space-4);
    padding-bottom: calc(var(--wn-space-4) + 60px); /* Account for nav bar */
    overflow-y: auto;
}

/* ========================================
   PHONE FRAME (For Mockups)
   ======================================== */
.wn-phone-frame {
    width: 280px;
    height: 580px;
    background: var(--wn-gray-900);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    position: relative;
}

.wn-phone-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: var(--wn-gray-900);
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.wn-phone-screen {
    width: 100%;
    height: 100%;
    background: var(--wn-bg-app, var(--wn-white));
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========================================
   STATUS BAR (iOS Style)
   ======================================== */
.wn-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--wn-space-2) var(--wn-space-4);
    padding-top: var(--wn-space-3);
    font-size: var(--wn-text-xs);
    font-weight: var(--wn-font-semibold);
    background: transparent;
    color: var(--wn-text-inverse);
}

.wn-status-bar-time {
    font-weight: var(--wn-font-bold);
}

.wn-status-bar-icons {
    display: flex;
    align-items: center;
    gap: var(--wn-space-1);
}

.wn-status-bar-icons i {
    font-size: 12px;
}

/* Status bar on light backgrounds */
.wn-status-bar.wn-status-bar-dark {
    color: var(--wn-text-primary);
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
.wn-app-content::-webkit-scrollbar {
    width: 4px;
}

.wn-app-content::-webkit-scrollbar-track {
    background: transparent;
}

.wn-app-content::-webkit-scrollbar-thumb {
    background: var(--wn-gray-300);
    border-radius: var(--wn-rounded-full);
}

.wn-app-content::-webkit-scrollbar-thumb:hover {
    background: var(--wn-gray-400);
}

/* ========================================
   FOCUS STATES
   ======================================== */
:focus-visible {
    outline: 2px solid var(--wn-border-focus, var(--wn-info));
    outline-offset: 2px;
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
    background-color: var(--wn-primary-light);
    color: var(--wn-primary-dark);
}
