/* ==========================================================================
   Smartphone Timelapse Camera — Page-Specific Styles
   Builds on top of ../../css/hub.css (shared parent stylesheet)
   ========================================================================== */

/* ---------- Page Layout ---------- */
.phonecam-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

/* ==========================================================================
   Stat Grid (4-col -> 2-col responsive)
   ========================================================================== */
.phonecam-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.phonecam-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    text-align: center;
}

.phonecam-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.phonecam-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
    font-weight: 600;
}

.phonecam-stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Coloured top border per stat */
.phonecam-stat[data-color="blue"]   { border-top: 3px solid #3b82f6; }
.phonecam-stat[data-color="green"]  { border-top: 3px solid #22c55e; }
.phonecam-stat[data-color="amber"]  { border-top: 3px solid #f59e0b; }
.phonecam-stat[data-color="purple"] { border-top: 3px solid #8b5cf6; }

@media (max-width: 900px) {
    .phonecam-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Section Headings
   ========================================================================== */
.phonecam-section {
    margin-bottom: 40px;
}

.phonecam-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* ==========================================================================
   Hardware / Software Cards (2-col)
   ========================================================================== */
.phonecam-hw-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.phonecam-hw-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.phonecam-hw-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phonecam-hw-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phonecam-hw-list li {
    padding: 4px 0;
    font-size: 0.875rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.phonecam-hw-list li:last-child {
    border-bottom: none;
}

.phonecam-hw-list li strong {
    color: #1e293b;
}

@media (max-width: 700px) {
    .phonecam-hw-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Upload Pipeline Diagram
   ========================================================================== */
.phonecam-pipeline {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 8px;
    overflow-x: auto;
}

.phonecam-pipe-step {
    flex: 1;
    min-width: 130px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    position: relative;
}

.phonecam-pipe-step + .phonecam-pipe-step {
    margin-left: 28px;
}

.phonecam-pipe-step + .phonecam-pipe-step::before {
    content: "\2192";
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
    font-weight: 300;
}

.phonecam-pipe-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.phonecam-pipe-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.phonecam-pipe-sub {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .phonecam-pipeline {
        flex-direction: column;
    }

    .phonecam-pipe-step + .phonecam-pipe-step {
        margin-left: 0;
        margin-top: 20px;
    }

    .phonecam-pipe-step + .phonecam-pipe-step::before {
        content: "\2193";
        left: 50%;
        top: -18px;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Risk / Note Boxes
   ========================================================================== */
.phonecam-notes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phonecam-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.phonecam-note-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.phonecam-note-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.phonecam-note-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.phonecam-note-body strong {
    font-weight: 700;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.phonecam-compare-wrap {
    overflow-x: auto;
}

.phonecam-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.phonecam-compare th,
.phonecam-compare td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.phonecam-compare thead th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.phonecam-compare tbody td {
    color: #475569;
}

.phonecam-compare tbody td strong {
    color: #1e293b;
}

.phonecam-compare tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Key Links Grid (2-col)
   ========================================================================== */
.phonecam-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.phonecam-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.phonecam-link-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
    text-decoration: none;
    color: inherit;
}

.phonecam-link-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phonecam-link-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.phonecam-link-desc {
    font-size: 0.78rem;
    color: #64748b;
}

@media (max-width: 600px) {
    .phonecam-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Dark Mode Overrides
   ========================================================================== */
[data-theme="dark"] .phonecam-stat,
[data-theme="dark"] .phonecam-hw-card,
[data-theme="dark"] .phonecam-pipe-step,
[data-theme="dark"] .phonecam-link-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .phonecam-stat-value,
[data-theme="dark"] .phonecam-section-title,
[data-theme="dark"] .phonecam-hw-title,
[data-theme="dark"] .phonecam-pipe-label,
[data-theme="dark"] .phonecam-link-title {
    color: #e2e8f0;
}

[data-theme="dark"] .phonecam-stat-label,
[data-theme="dark"] .phonecam-pipe-sub,
[data-theme="dark"] .phonecam-link-desc {
    color: #94a3b8;
}

[data-theme="dark"] .phonecam-hw-list li {
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .phonecam-hw-list li strong {
    color: #e2e8f0;
}

[data-theme="dark"] .phonecam-section-title {
    border-color: #334155;
}

[data-theme="dark"] .phonecam-link-icon {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .phonecam-pipe-step + .phonecam-pipe-step::before {
    color: #475569;
}

[data-theme="dark"] .phonecam-stat-sub {
    color: #64748b;
}

/* Dark mode — risk/note boxes */
[data-theme="dark"] .phonecam-note-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #78350f;
    color: #fbbf24;
}

[data-theme="dark"] .phonecam-note-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #1e3a5f;
    color: #93c5fd;
}

/* Dark mode — comparison table */
[data-theme="dark"] .phonecam-compare thead th {
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .phonecam-compare th,
[data-theme="dark"] .phonecam-compare td {
    border-color: #334155;
}

[data-theme="dark"] .phonecam-compare tbody td {
    color: #94a3b8;
}

[data-theme="dark"] .phonecam-compare tbody td strong {
    color: #e2e8f0;
}
