/* --- SECTION 3: CLOUD PLAYGROUND - PUDDING UI --- */
.cp-dashboard {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

/* Master Timeline Scrubber */
#cp-timeline-container {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    padding-top: 1.5rem;
}

#cloud-playground .section-header {
    max-width: 740px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

#cloud-playground .section-header p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #444;
}

.timeline-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
    pointer-events: none;
}

#cp-master-timeline {
    width: 100%;
    height: 60px;
    background: #eee;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    display: flex;
    align-items: flex-end;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-bar {
    flex: 1;
    margin: 0 1px;
    background: #ccc;
    opacity: 0.8;
    transition: height 0.2s, background 0.2s;
}

.timeline-bar:hover {
    background: #000 !important;
    opacity: 1;
}

.timeline-cursor {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #f4d03f;
    border-left: 1px solid rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(244, 208, 63, 0.5);
    transition: left 0.1s;
}

.timeline-cursor::after {
    content: "▼";
    position: absolute;
    top: -14px;
    left: -50%;
    transform: translateX(-2px);
    color: #333;
    font-size: 10px;
}

.cp-controls {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cp-preview {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.cp-image-container {
    width: 100%;
    aspect-ratio: 4/3;
    background: #eee;
    position: relative;
    border-bottom: var(--border-light);
    overflow: hidden;
}

#cp-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-out;
}

.cp-overlay-label {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 100;
}

.cp-stats-row {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cp-stat-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
}

.cp-stat-value {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cp-meter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 150px;
}

.cp-meter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 4px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

#cp-progress-fill {
    height: 100%;
    background: #222;
    transition: width 0.3s;
}

#cp-progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #444;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #000;
    border-bottom-color: #000;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

select {
    width: 100%;
    padding: 0.5rem;
    border: var(--border-light);
    border-radius: 4px;
    font-size: 1rem;
    background: #f9f9f9;
}

#cp-master-timeline {
    width: 100%;
    height: 80px;
    /* Taller for variable bars */
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: flex-end;
    /* Bars grow from bottom */
    overflow: hidden;
    position: relative;
    /* For cursor */
}

.timeline-bar {
    flex: 1;
    background: #ccc;
    margin: 0 1px;
    /* Restore gaps */
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.2s;
    /* height will be set in JS */
    min-height: 10%;
}

.timeline-bar:hover {
    opacity: 1;
    transform: scaleY(1.1);
}

.special-day-marker {
    border-top: 3px solid #f4d03f;
    opacity: 1;
}

.time-toggles {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn,
.action-btn {
    flex: 1;
    padding: 0.75rem;
    border: var(--border-light);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.toggle-btn.active,
.action-btn:hover {
    background: #222;
    color: white;
    border-color: #222;
}

.action-btn {
    display: block;
    width: 100%;
    margin-bottom: 0.75rem;
    text-align: left;
}

.action-btn.secondary {
    background: #f9f9f9;
    color: #666;
}

.action-btn.secondary:hover {
    background: #eee;
    color: #333;
    border-color: #ccc;
}

.helper-text {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Timelapse & Deep Dive UI */
.timelapse-btn {
    width: 100%;
    padding: 0.8rem;
    background: #222;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.timelapse-btn:hover {
    background: #000;
}

.timelapse-btn.active {
    background: #f4d03f;
    color: #222;
}

.badge-special {
    background: #f4d03f;
    color: #222;
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.special-day-marker {
    border-top: 3px solid #f4d03f !important;
    /* Yellow marker on top */
    opacity: 1 !important;
}

#group-day-scrubber {
    background: #fdfefe;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #f4d03f;
}

.scrubber-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.5rem;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
}

/* Nav Row styling */
.nav-row {
    margin-bottom: 2rem !important;
}

.nav-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #888;
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: #222;
    color: #222;
}

#btn-deep-jump {
    font-weight: 600;
    font-size: 0.85rem;
}

#btn-deep-jump:hover {
    background: rgba(244, 208, 63, 0.1) !important;
    border-color: #f4d03f;
    color: #886f00;
}

/* Quick Find Links */
.text-link {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
    /* Cleaner than dotted */
    font-size: 0.8rem;
    margin: 0 0.25rem;
}

.text-link:hover {
    color: #222;
    border-bottom-color: #f4d03f;
    /* Gold accent on hover */
}

/* Deep Dive Panel */
#deep-dive-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #eee;
    border-left: 3px solid #f4d03f;
    border-radius: 2px;
}

#deep-dive-panel .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
    /* Ensure space between label and button */
}

#deep-dive-panel label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

#btn-replay-day {
    padding: 0.3rem 0.6rem;
    /* Compact padding */
    font-size: 0.75rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    /* Prevent wrapping */
    min-width: 80px;
    text-align: center;
}

#btn-replay-day:hover {
    border-color: #222;
    background: #fafafa;
}

/* Guidance Text */
.helper-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    font-weight: 400;
    font-style: normal;
    /* Explicitly no italics */
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.separator {
    color: #ddd;
    font-weight: 300;
}

.quiet-btn {
    background: transparent;
    border: 1px solid #eee;
    color: #888;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 0.5rem;
}

.quiet-btn:hover {
    color: #222;
    border-color: #ccc;
}

/* Mode Switch Group */
.mode-toggles {
    display: flex;
    background: #f0f0f0;
    padding: 0.25rem;
    border-radius: 4px;
    gap: 0.25rem;
}

.mode-toggles .toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
}

.mode-toggles .toggle-btn:hover {
    color: #222;
}

.mode-toggles .toggle-btn.active {
    background: white;
    color: #222;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}