/**
 * Jimber Debug Collector - Shared Styles
 * Brand colors and design system matching sase.jimber.io
 */

/* CSS Variables */
:root {
    --color-primary: #111279;
    --color-accent: #59C3C3;
    --color-accent-hover: #449393;
    --color-bg-light: #DEF3F3;
    --color-bg-white: #FFFFFF;
    --color-text: #111279;
    --color-text-muted: #6B7280;
    --color-border: #E5E7EB;
    --font-family: 'Alexandria', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Layout */
.page {
    width: 100%;
    max-width: 520px;
    background: var(--color-bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.page--wide {
    max-width: 680px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.logo-img {
    height: 32px;
    width: auto;
}

.logo svg {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

/* Header */
.header {
    padding: 40px 40px 32px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 16px;
}

.header p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Content */
.content {
    padding: 32px 40px 40px;
}

/* Platform Cards (selector page) */
.platform-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
}

.platform-card:hover {
    border-color: var(--color-accent);
    background: #F8FFFE;
    box-shadow: var(--shadow-md);
}

.platform-card .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.platform-card .platform-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.platform-card .info {
    flex: 1;
}

.platform-card .info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.platform-card .info p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.platform-card .arrow {
    color: var(--color-text-muted);
    transition: var(--transition);
}

.platform-card:hover .arrow {
    color: var(--color-accent);
    transform: translateX(4px);
}

/* Steps */
.steps {
    margin-bottom: 24px;
}

.steps h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.steps ol {
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding-left: 36px;
    padding-bottom: 12px;
    font-size: 0.9rem;
    color: var(--color-text);
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--color-bg-light);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps li:last-child {
    padding-bottom: 0;
}

.steps code {
    background: var(--color-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85em;
}

.steps .kbd {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.8em;
    font-weight: 500;
}

/* Command Box */
.command-section {
    margin-bottom: 24px;
}

.command-section h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.command-box {
    position: relative;
    background: #1a1a2e;
    border-radius: var(--radius);
    padding: 16px 60px 16px 16px;
    overflow-x: auto;
}

.command-box code {
    display: block;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.85rem;
    color: #E4E4E7;
    white-space: nowrap;
}

.copy-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--color-accent-hover);
}

.copy-btn.copied {
    background: #059669;
}

/* Note Box */
.note {
    background: #FEF3C7;
    border-left: 3px solid #F59E0B;
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 24px;
}

.note p {
    font-size: 0.85rem;
    color: #92400E;
    margin: 0;
}

.note strong {
    font-weight: 600;
}

/* Danger Note Box */
.note--danger {
    background: #FEE2E2;
    border-left-color: #DC2626;
}

.note--danger p {
    color: #7F1D1D;
}

/* Fallback */
.fallback {
    border-top: 1px solid var(--color-border);
    padding-top: 32px;
    margin-top: 32px;
    margin-bottom: 40px;
}

.fallback p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.fallback .command-box {
    background: #F3F4F6;
}

.fallback .command-box code {
    color: var(--color-text);
    font-size: 0.8rem;
}

/* After Steps */
.after-section {
    background: var(--color-bg-light);
    margin: 0 -40px -40px;
    padding: 24px 40px 32px;
}

.after-section h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.after-section ol {
    list-style: none;
    counter-reset: after;
}

.after-section li {
    position: relative;
    padding-left: 32px;
    padding-bottom: 8px;
    font-size: 0.9rem;
}

.after-section li::before {
    counter-increment: after;
    content: counter(after) ".";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--color-primary);
}

.after-section a {
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}

.after-section a:hover {
    text-decoration: underline;
}

/* Info Section (selector page) */
.info-section {
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
    margin-top: 24px;
}

.info-section h2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.info-item ul {
    list-style: none;
}

.info-item li {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 2px 0;
}

/* Footer */
.footer {
    padding: 20px 40px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: #FAFAFA;
}

.footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.footer a {
    color: var(--color-accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 24px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--color-accent);
}

/* Badge */
.badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 20px 16px;
        align-items: flex-start;
    }
    
    .page {
        border-radius: var(--radius);
    }
    
    .header {
        padding: 32px 24px 24px;
    }
    
    .content {
        padding: 24px;
    }
    
    .command-box {
        padding: 14px 14px 50px;
    }
    
    .copy-btn {
        top: auto;
        bottom: 10px;
        right: 10px;
        transform: none;
    }
    
    .after-section {
        margin: 0 -24px -24px;
        padding: 20px 24px 24px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer {
        padding: 16px 24px;
    }
}
