/* RetroShelf Custom Styles */

/* Prevent iOS overscroll from revealing browser chrome background */
html {
    background-color: #0d0d1a;
}

/* Navigation */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    transition: background-color 0.15s, color 0.15s;
    text-decoration: none;
}
.nav-link:hover {
    background-color: #1e1e3a;
    color: #f1f5f9;
}

/* Sidebar */
.sidebar-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    display: block;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
    cursor: pointer;
}
.sidebar-link:hover {
    background-color: #1e1e3a;
    color: #e2e8f0;
}
.sidebar-link-active {
    background-color: #1e1e3a;
    color: #00d4ff;
    font-weight: 500;
}

/* Item Cards */
.item-card {
    background-color: #151528;
    border: 1px solid #1e1e3a;
    border-radius: 0.75rem;
    overflow: hidden;
    display: block;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.item-card:hover {
    border-color: #4a4a6a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Filter chip */
.filter-chip {
    display: inline-block;
    font-size: 0.75rem;
    background-color: #1e1e3a;
    color: #cbd5e1;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-bottom: 0.25rem;
}

/* Forms */
.form-section {
    padding: 1.25rem;
    background-color: #151528;
    border: 1px solid #1e1e3a;
    border-radius: 0.75rem;
}
.form-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1e1e3a;
    display: block;
}
.form-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.form-input {
    width: 100%;
    background-color: #0d0d1a;
    border: 1px solid #2a2a4a;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #e2e8f0;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder {
    color: #475569;
}
.form-input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
    cursor: pointer;
}
select.form-input option {
    background-color: #1a1a2e;
    color: #e2e8f0;
}
input[type="date"].form-input,
input[type="number"].form-input {
    color-scheme: dark;
}

/* Info cards (item detail) */
.info-card {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background-color: #0d0d1a;
    border: 1px solid #1e1e3a;
    border-radius: 0.5rem;
}
.info-label {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.125rem;
}
.info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* KPI Cards (stats) */
.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
    background-color: #151528;
    border: 1px solid #1e1e3a;
    border-radius: 0.75rem;
}
.kpi-icon  { font-size: 1.875rem; margin-bottom: 0.5rem; }
.kpi-value { font-size: 1.25rem; font-weight: 700; color: #f1f5f9; margin-bottom: 0.125rem; }
.kpi-label { font-size: 0.75rem; color: #64748b; }

/* Condition dots & badges */
.condition-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    margin-right: 0.25rem;
    flex-shrink: 0;
}
.condition-mint       { background-color: #10b981; }
.condition-near-mint  { background-color: #34d399; }
.condition-excellent  { background-color: #60a5fa; }
.condition-good       { background-color: #a78bfa; }
.condition-fair       { background-color: #f59e0b; }
.condition-poor       { background-color: #f97316; }
.condition-for-parts  { background-color: #ef4444; }

.condition-badge-mint        { background: rgba(16,185,129,0.15);  color: #6ee7b7; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }
.condition-badge-near-mint   { background: rgba(52,211,153,0.15);  color: #6ee7b7; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }
.condition-badge-excellent   { background: rgba(96,165,250,0.15);  color: #93c5fd; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }
.condition-badge-good        { background: rgba(167,139,250,0.15); color: #c4b5fd; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }
.condition-badge-fair        { background: rgba(245,158,11,0.15);  color: #fcd34d; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }
.condition-badge-poor        { background: rgba(249,115,22,0.15);  color: #fdba74; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }
.condition-badge-for-parts   { background: rgba(239,68,68,0.15);   color: #fca5a5; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.7rem; }

/* Scrollbar */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: #0d0d1a; }
::-webkit-scrollbar-thumb        { background: #2a2a4a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: #3a3a5a; }

/* Misc */
.photo-thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #1e1e3a;
    cursor: pointer;
    transition: border-color 0.15s;
}
.photo-thumb:hover { border-color: #00d4ff; }

textarea.form-input {
    resize: vertical;
    min-height: 5rem;
}

/* PWA bottom navigation (only shown in standalone/installed mode) */
.pwa-bottom-nav { display: none; }

.pwa-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
    font-size: 0.625rem;
}
.pwa-nav-item:hover  { color: #94a3b8; }
.pwa-nav-item.active { color: #00d4ff; }
.pwa-nav-item span:first-child { font-size: 1.25rem; line-height: 1; }

.pwa-nav-add {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.pwa-nav-add-circle {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: #fff;
    transition: background 0.15s;
    line-height: 1;
}
.pwa-nav-add:hover .pwa-nav-add-circle { background: #166534; }

html.pwa-mode .pwa-bottom-nav { display: flex; }
html.pwa-mode main { padding-bottom: calc(3.75rem + env(safe-area-inset-bottom)); }
