/* PWA Offline Demo Styles */

:root {
    --primary: #4a90d9;
    --primary-dark: #3a7bc8;
    --success: #34c759;
    --warning: #ffcc00;
    --error: #ff3b30;
    --bg: #f5f5f7;
    --card-bg: #ffffff;
    --text: #1d1d1f;
    --text-muted: #6e6e73;
    --border: #d2d2d7;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
}

.subtitle {
    margin: 0 0 24px 0;
    color: var(--text-muted);
}

h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
}

h3 {
    margin: 20px 0 12px 0;
    font-size: 15px;
    font-weight: 600;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card summary {
    cursor: pointer;
    font-weight: 600;
    padding: 4px 0;
}

.card summary:hover {
    color: var(--primary);
}

/* Status Display */
.status-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.status-row .label {
    min-width: 80px;
    color: var(--text-muted);
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge.checking {
    background: #f0f0f0;
    color: var(--text-muted);
}

.status-badge.caching {
    background: #fff3cd;
    color: #856404;
}

.status-badge.ready {
    background: #d4edda;
    color: #155724;
}

.status-badge.offline {
    background: #cce5ff;
    color: #004085;
}

.status-badge.error,
.status-badge.unsupported {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.incomplete {
    background: #fff3cd;
    color: #856404;
}

/* Progress Bar */
.progress-container {
    margin: 16px 0;
    background: #e9ecef;
    border-radius: 8px;
    height: 24px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: var(--primary);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

/* Buttons */
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: var(--primary);
    color: white;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn.secondary {
    background: #e9ecef;
    color: var(--text);
}

.btn.secondary:hover {
    background: #dde0e4;
}

.btn.primary {
    background: var(--success);
}

.btn.primary:hover {
    background: #28a745;
}

.btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Update Banner */
.update-banner {
    background: #d4edda;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.update-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.update-content strong {
    color: #155724;
}

/* Lists */
ol, ul {
    margin: 0;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
}

code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
}

pre {
    background: #1d1d1f;
    color: #f0f0f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    line-height: 1.4;
    margin: 12px 0 0 0;
    max-height: 300px;
}

pre:empty {
    display: none;
}

/* Demo App Component */
demo-app {
    display: block;
    margin-top: 24px;
}
