/* Combined Schedule Editor Styles - iOS Layout */
.combined-schedule-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    background: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Global Controls - iOS Settings Style */
.global-controls {
    margin: 0;
    padding: 0;
}

/* Settings Section Styles */
.global-controls .settings-section {
    background: #1c1c1e;
    border-radius: 0;
    margin-bottom: 35px;
    overflow: hidden;
    border-top: 0.5px solid #48484a;
    border-bottom: 0.5px solid #48484a;
}

.global-controls .setting-row {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    min-height: 44px;
    position: relative;
    background: #1c1c1e;
}

.global-controls .setting-row:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 0;
    bottom: 0;
    height: 0.5px;
    background: #48484a;
    transform: scaleY(0.5);
}

.global-controls .setting-icon {
    font-size: 22px;
    margin-right: 12px;
    flex-shrink: 0;
    width: 29px;
    text-align: center;
}

.global-controls .setting-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.global-controls .setting-label {
    font-size: 17px;
    font-weight: 400;
    color: #ffffff;
    line-height: 22px;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.global-controls .setting-radio-group {
    display: flex;
    gap: 24px;
    margin: 0;
    flex-shrink: 0;
}

.global-controls .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.global-controls .radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #007aff;
    cursor: pointer;
}

.global-controls .radio-label {
    font-size: 17px;
    color: #ffffff;
    font-weight: 400;
    cursor: pointer;
}

/* Schedule Time Settings Summary Row */
.schedule-time-link {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.schedule-time-link:active {
    background: #2c2c2e !important;
}

.schedule-time-content {
    flex: 1;
    min-width: 0;
}

.schedule-time-label {
    font-size: 17px;
    font-weight: 400;
    color: #ffffff;
    line-height: 22px;
}

.schedule-time-mode {
    color: #0a84ff;
}

.schedule-time-detail {
    font-size: 13px;
    color: #8e8e93;
    line-height: 18px;
    margin-top: 1px;
}

.schedule-time-detail:empty {
    display: none;
}

.schedule-time-arrow {
    color: #48484a;
    font-size: 22px;
    font-weight: 300;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Schedule Controls Row - View Selector and Demo Mode */
.schedule-controls-row {
    background: #1c1c1e;
    border-radius: 0;
    margin-bottom: 35px;
    border-top: 0.5px solid #48484a;
    border-bottom: 0.5px solid #48484a;
    padding: 11px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color-scheme: dark;
    /* Force dark color scheme for child elements */
}

.view-selector-container {
    flex: 1;
    max-width: 200px;
    position: relative;
}

/* Chevron on the container, not the select — avoids option inheritance */
.view-selector-container::after {
    content: '';
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.view-selector {
    width: 100%;
    height: 36px;
    padding: 0 36px 0 12px;
    background-color: #2c2c2e;
    border: 1px solid #48484a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    color-scheme: dark;
}

.view-selector option {
    background-color: #2c2c2e;
    color: #ffffff;
}

.view-selector:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 1px #007aff;
}

.view-selector optgroup {
    background-color: #2c2c2e;
    color: #ffffff;
}

/* Light mode override */
@media (prefers-color-scheme: light) {
    .view-selector-container::after {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }
    .view-selector {
        background-color: #f2f2f7;
        border-color: #c6c6c8;
        color: #000000;
    }
    .view-selector option {
        background-color: #ffffff;
        color: #000000;
    }
}

/* Theme-based overrides */
.theme-dark .view-selector {
    background-color: #2c2c2e;
    border-color: #48484a;
    color: #ffffff;
}
.theme-dark .view-selector option {
    background-color: #2c2c2e;
    color: #ffffff;
}

.theme-light .view-selector-container::after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}
.theme-light .view-selector {
    background-color: #f2f2f7;
    border-color: #c6c6c8;
    color: #000000;
}
.theme-light .view-selector option {
    background-color: #ffffff;
    color: #000000;
}

.schedule-save-indicator {
    opacity: 0;
    color: #30d158;
    font-size: 18px;
    font-weight: 700;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.schedule-save-indicator.flash {
    animation: save-flash 1s ease forwards;
}
@keyframes save-flash {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

.demo-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: #2c2c2e;
    border: 1px solid #48484a;
    border-radius: 8px;
    color: #007aff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.demo-mode-btn:hover {
    background: #3a3a3c;
}

.demo-mode-btn:active {
    transform: scale(0.98);
}

.demo-mode-btn.active {
    background: #007aff;
    color: #ffffff;
}

/* Light mode styling for demo button */
@media (prefers-color-scheme: light) {
    .demo-mode-btn {
        background: #f2f2f7;
        border-color: #c6c6c8;
    }

    .demo-mode-btn:hover {
        background: #e5e5ea;
    }
}

/* Theme-based overrides for demo button */
.theme-light .demo-mode-btn {
    background: #f2f2f7;
    border-color: #c6c6c8;
}

.theme-light .demo-mode-btn:hover {
    background: #e5e5ea;
}

.theme-dark .demo-mode-btn {
    background: #2c2c2e;
    border-color: #48484a;
}

.theme-dark .demo-mode-btn:hover {
    background: #3a3a3c;
}

.demo-mode-btn .demo-icon {
    font-size: 16px;
}

.demo-mode-btn .demo-label {
    font-size: 14px;
    font-weight: 500;
}

/* Graph Container - Full Width */
.graph-container {
    position: relative;
    background: #000000;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
}

/* Graph Instructions */
.graph-instructions {
    background: #1c1c1e;
    border-bottom: 0.5px solid #48484a;
    padding: 8px 0;
    font-size: 15px;
    color: #8e8e93;
    font-weight: 400;
    text-align: center;
    font-style: italic;
    box-sizing: border-box;
}

.graph-section-header {
    background: #1c1c1e;
    border-top: 0.5px solid #48484a;
    border-bottom: 0.5px solid #48484a;
    padding: 11px 16px;
    margin-bottom: 0;
}

.graph-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Time Labels */
.time-labels {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    background: #1c1c1e;
    border-bottom: 0.5px solid #48484a;
    font-size: 13px;
    color: #8e8e93;
    font-weight: 400;
    box-sizing: border-box;
}

/* Graph Area */
.graph-area {
    position: relative;
    height: 300px;
    min-height: 280px;
    background: #000000;
    margin: 0 0 10px 0;
    touch-action: none;
    -ms-touch-action: none;
    box-sizing: border-box;
}

#scheduleCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    touch-action: none;
    -ms-touch-action: none;
    box-sizing: border-box;
    max-width: 100%;
}

/* SkySync Override Bar - displayed below the graph, not overlapping */
.skysync-bar-container {
    position: relative;
    margin: 0 0 12px 0;
    padding: 0 4px;
    box-sizing: border-box;
    touch-action: none;
    -ms-touch-action: none;
}

.skysync-bar-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    padding-left: 2px;
}

.skysync-settings-link {
    color: rgba(74, 173, 232, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
}
.skysync-settings-link:hover {
    color: rgba(74, 173, 232, 1);
}

.skysync-bar-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: rgba(74, 173, 232, 0.9);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    .skysync-bar-label {
        color: rgba(74, 173, 232, 1);
    }
}

.skysync-status-msg {
    font-size: 10px;
    color: #ff9f0a;
    margin-top: 3px;
    padding-left: 2px;
}

#skysyncBarCanvas {
    width: 100%;
    height: 24px;
    display: block;
    cursor: pointer;
    touch-action: none;
    -ms-touch-action: none;
    border-radius: 4px;
}

/* Intensity and CCT Labels */
.intensity-labels,
.cct-labels {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50px;
    display: none;
    /* Hide HTML labels - using canvas-drawn labels instead */
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 11px;
    color: #8e8e93;
    pointer-events: none;
    z-index: 10;
}

.cct-labels {
    right: 0;
    left: auto;
    text-align: right;
    padding-right: 8px;
}

.intensity-labels {
    padding-left: 8px;
}

/* Current Time Indicator */
.current-time-line {
    position: absolute;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ff9500;
    z-index: 15;
    pointer-events: auto;
    cursor: ew-resize;
    touch-action: none;
    /* Expand invisible hit area for easier touch targeting */
    padding: 12px;
    margin: -12px;
    transform: translateX(-50%);
}

.current-time-vertical-line {
    position: absolute;
    top: 0px;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            #333333 0px,
            #333333 6px,
            transparent 6px,
            transparent 12px);
    background-size: 100% 12px;
    z-index: 14;
    pointer-events: none;
    transform: translateX(-50%);
    animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 12px;
    }
}

.current-time-label {
    position: absolute;
    top: -24px;
    font-size: 11px;
    color: #ff9500;
    font-weight: 500;
    z-index: 15;
    pointer-events: none;
    white-space: nowrap;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
}

/* Schedule Time Indicator - Demo Mode */
.schedule-time-line {
    position: absolute;
    bottom: -10px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 9px solid #00cc00;
    z-index: 16;
    pointer-events: none;
    transform: translateX(-50%);
    display: none;
    /* Add subtle dark outline for better visibility */
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
    /* Transition will be added by JavaScript after initial positioning */
}

.schedule-time-vertical-line {
    position: absolute;
    bottom: 0px;
    width: 3px;
    background: #00cc00;
    z-index: 15;
    pointer-events: none;
    transform: translateX(-50%);
    display: none;
    opacity: 0.9;
    /* Add dark borders for better contrast */
    box-shadow: -1px 0 0 rgba(0, 0, 0, 0.8), 1px 0 0 rgba(0, 0, 0, 0.8);
    /* No glow or animation - just a solid line with dark edges */
    /* Transition will be added by JavaScript after initial positioning */
}

/* Demo Time Label */
.schedule-time-label {
    position: absolute;
    bottom: -30px;
    font-size: 12px;
    color: #00cc00;
    font-weight: 600;
    z-index: 17;
    pointer-events: none;
    white-space: nowrap;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00cc00;
    border-radius: 4px;
    transform: translateX(-50%);
    display: none;
    /* No glow animation - just a simple label */
    /* Transition will be added by JavaScript after initial positioning */
}

/* Drag Tooltip */
.drag-tooltip {
    position: absolute;
    background: rgba(28, 28, 30, 0.95);
    border: 1px solid #48484a;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Removed - now using list-controls styling for both views */

.btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    letter-spacing: -0.24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background: linear-gradient(180deg, #007aff 0%, #0056cc 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #0056cc 0%, #004499 100%);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: #004499;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.3);
    transform: translateY(0px) scale(0.98);
}

.btn-secondary {
    background: rgba(60, 60, 67, 0.18);
    color: #007aff;
    border: 0.5px solid rgba(0, 122, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: rgba(60, 60, 67, 0.25);
    border-color: rgba(0, 122, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn-secondary:active {
    background: rgba(60, 60, 67, 0.35);
    border-color: rgba(0, 122, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transform: translateY(0px) scale(0.98);
}

.btn-warning {
    background: linear-gradient(180deg, #ff9500 0%, #e6850e 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(255, 149, 0, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(180deg, #e6850e 0%, #cc7700 100%);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
    transform: translateY(-1px);
}

.btn-warning:active {
    background: #cc7700;
    box-shadow: 0 1px 3px rgba(255, 149, 0, 0.3);
    transform: translateY(0px) scale(0.98);
}

/* Floating Undo Button */
.floating-undo-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: rgba(58, 58, 60, 0.95);
    color: #ffffff;
    border: 0.5px solid rgba(84, 84, 88, 0.6);
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    line-height: 1;
    text-align: center;
    padding: 0;
    margin: 0;
    /* Additional centering for the arrow character */
    text-indent: -1px;
    /* Slight adjustment to center the arrow better */
}

.floating-undo-btn:hover {
    background: rgba(72, 72, 74, 0.95);
    border-color: rgba(99, 99, 102, 0.8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px) scale(1.02);
}

.floating-undo-btn:active {
    background: rgba(44, 44, 46, 0.95);
    border-color: rgba(72, 72, 74, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(0px) scale(0.98);
}

/* Position-specific styling */
.floating-undo-btn.left-side {
    /* Additional styles for left positioning if needed */
}

.floating-undo-btn.right-side {
    /* Additional styles for right positioning if needed */
}

/* List Container - Full Width iOS Style */
.list-container {
    background: #000000;
    padding: 0;
    margin: 0;
}

.schedule-points-list {
    background: #1c1c1e;
    border-top: 0.5px solid #48484a;
    border-bottom: 0.5px solid #48484a;
    margin-bottom: 35px;
}

/* Schedule Point Items */
.schedule-point-item {
    background: #1c1c1e;
    position: relative;
    transition: all 0.3s ease;
}

.schedule-point-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 0;
    bottom: 0;
    height: 0.5px;
    background: #48484a;
    transform: scaleY(0.5);
}

.schedule-point-item.newly-added {
    animation: slideInAndHighlight 1.8s ease;
}

.schedule-point-item.deleting {
    animation: slideOutAndFade 0.4s ease forwards;
}

@keyframes slideInAndHighlight {
    0% {
        transform: translateX(-100%);
        background: rgba(0, 122, 255, 0.3);
    }

    30% {
        transform: translateX(0);
        background: rgba(0, 122, 255, 0.3);
    }

    100% {
        transform: translateX(0);
        background: #1c1c1e;
    }
}

@keyframes slideOutAndFade {
    0% {
        transform: translateX(0) scaleY(1);
        opacity: 1;
        max-height: 66px;
        margin: 0;
        padding: 11px 16px;
    }

    50% {
        transform: translateX(100%) scaleY(1);
        opacity: 0.5;
        max-height: 66px;
        margin: 0;
        padding: 11px 16px;
    }

    100% {
        transform: translateX(100%) scaleY(0);
        opacity: 0;
        max-height: 0;
        margin: 0;
        padding: 0 16px;
    }
}

.point-row {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    min-height: 44px;
    gap: 12px;
}

.point-delete-action,
.point-add-action {
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.point-delete-btn,
.point-add-inline-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 16px;
    background: rgba(60, 60, 67, 0.18);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Spacer styles removed - now using disabled buttons for consistent layout */

.spacer-add {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 0.5px solid transparent;
    /* match button border */
    box-sizing: border-box;
    /* include border in width */
}

.point-delete-btn {
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    font-size: 14px;
}

.point-delete-btn:hover {
    background: linear-gradient(135deg, #d70015 0%, #cc2e24 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px) scale(1.02);
}

.point-delete-btn:active {
    background: #cc2e24;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transform: translateY(0px) scale(0.98);
}

.point-delete-btn.disabled {
    background: rgba(60, 60, 67, 0.18);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    opacity: 0.5;
}

.point-delete-btn.disabled:hover {
    background: rgba(60, 60, 67, 0.18);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transform: none;
}

.point-delete-btn.disabled:active {
    background: rgba(60, 60, 67, 0.18);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transform: none;
}

/* point-edit-btn styles removed - now using clickable intensity/CCT cells */

.point-add-inline-btn {
    background: rgba(60, 60, 67, 0.18);
    color: #ffffff;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 700;
}

.point-add-inline-btn:hover {
    background: rgba(60, 60, 67, 0.28);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px) scale(1.02);
}

.point-add-inline-btn:active {
    background: rgba(60, 60, 67, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transform: translateY(0px) scale(0.98);
}

.point-time-display {
    font-size: 17px;
    font-weight: 400;
    color: #ffffff;
    flex: 1 1 auto;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 36px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.point-intensity-display {
    font-size: 17px;
    color: #8e8e93;
    flex: 0 0 70px;
    /* Increased for button styling */
    width: 70px;
    /* Explicit width to ensure consistency */
    min-width: 70px;
    /* Prevent shrinking */
    max-width: 70px;
    /* Prevent growing */
    text-align: center;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.point-intensity-btn {
    cursor: pointer;
    background: rgba(60, 60, 67, 0.18);
    border: 1px solid #48484a;
    border-radius: 8px;
    transition: all 0.15s ease;
    color: #ffffff;
}

.point-intensity-btn:hover {
    background: rgba(60, 60, 67, 0.28);
    transform: scale(1.02);
}

.point-intensity-btn:active {
    background: rgba(60, 60, 67, 0.4);
    transform: scale(0.98);
}

.intensity-value {
    font-weight: 600;
}

.point-cct-display {
    position: relative;
    font-size: 15px;
    color: #000000;
    font-weight: 600;
    flex: 0 0 85px;
    /* Increased to accommodate longer CCT values */
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.point-cct-btn {
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: all 0.15s ease;
}

.point-cct-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.point-cct-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.point-cct-intensity-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    pointer-events: none;
}



/* Modal Styles - iOS Style */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #1c1c1e;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    padding: 20px 20px 16px;
    border-bottom: 0.5px solid #48484a;
}

.slider-group {
    padding: 20px;
    border-bottom: 0.5px solid #48484a;
}

.slider-group:last-of-type {
    border-bottom: none;
}

.slider-group label {
    display: block;
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
}

.slider-container {
    margin-bottom: 12px;
}

.slider {
    width: 100%;
    height: 32px;
    border-radius: 16px;
    background: #2c2c2e;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.input-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.value-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #48484a;
    border-radius: 8px;
    background: #2c2c2e;
    color: #ffffff;
    font-size: 16px;
    font-family: inherit;
}

.input-unit {
    font-size: 16px;
    color: #8e8e93;
    font-weight: 400;
}

.preview-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #48484a;
}

.modal-actions {
    display: flex;
    border-top: 0.5px solid #48484a;
}

.modal-actions .btn {
    flex: 1;
    border-radius: 0;
    border: none;
    border-right: 0.5px solid #48484a;
    padding: 18px 16px;
    font-size: 17px;
    font-weight: 600;
    background: transparent;
    min-height: 56px;
    box-shadow: none;
    transition: all 0.15s ease;
    letter-spacing: -0.24px;
}

.modal-actions .btn:first-child {
    border-bottom-left-radius: 14px;
}

.modal-actions .btn:last-child {
    border-right: none;
    border-bottom-right-radius: 14px;
}

.modal-actions .btn-delete {
    color: #ff3b30;
    font-weight: 600;
}

.modal-actions .btn-secondary {
    color: #007aff;
    font-weight: 600;
}

.modal-actions .btn:hover {
    background: rgba(60, 60, 67, 0.18);
}

.modal-actions .btn:active {
    background: rgba(60, 60, 67, 0.3);
    transform: scale(0.98);
}

/* Responsive Design */
@media (max-width: 600px) {
    .global-controls .setting-row {
        padding: 10px 16px;
        min-height: 40px;
    }

    .global-controls .setting-icon {
        font-size: 20px;
        margin-right: 10px;
    }

    .global-controls .setting-label {
        font-size: 16px;
    }

    .global-controls .radio-label {
        font-size: 16px;
    }

    .global-controls .setting-radio-group {
        gap: 20px;
    }

    .schedule-controls-row {
        padding: 8px 16px;
        flex-direction: row;
        gap: 8px;
    }

    .view-selector-container {
        max-width: 150px;
    }

    .view-selector {
        height: 32px;
        padding: 0 30px 0 10px;
        font-size: 13px;
    }

    .demo-mode-btn {
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }

    .demo-mode-btn .demo-icon {
        font-size: 14px;
    }

    .graph-area {
        height: 250px;
        min-height: 220px;
        margin: 0 0 10px 0;
    }

    /* Removed - now using list-controls styling for both views */

    .btn {
        padding: 10px 16px;
        font-size: 16px;
        min-height: 46px;
        border-radius: 8px;
    }

    .point-row {
        gap: 8px;
        padding: 10px 16px;
    }

    .point-time-display {
        flex: 1 1 auto;
        font-size: 16px;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 36px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
    }

    .point-intensity-display {
        flex: 0 0 65px;
        /* Increased for button styling */
        width: 65px;
        /* Explicit width to ensure consistency */
        min-width: 65px;
        /* Prevent shrinking */
        max-width: 65px;
        /* Prevent growing */
        font-size: 16px;
        box-sizing: border-box;
    }

    .point-intensity-btn .intensity-value {
        font-size: 16px;
    }

    .point-cct-display {
        flex: 0 0 75px;
        /* Increased to accommodate longer CCT values */
        font-size: 14px;
        min-height: 32px;
    }

    .point-delete-action,
    .point-add-action {
        flex: 0 0 28px;
    }

    .point-delete-btn,
    .point-add-inline-btn {
        width: 28px;
        height: 28px;
        border-radius: 14px;
        font-size: 14px;
    }

    .point-add-inline-btn {
        font-size: 12px;
    }

    .spacer-add {
        width: 28px;
        height: 28px;
    }

    .modal {
        max-width: 350px;
    }
}

@media (max-width: 400px) {
    .global-controls .setting-row {
        padding: 8px 12px;
        min-height: 36px;
    }

    .global-controls .setting-icon {
        font-size: 18px;
        margin-right: 8px;
    }

    .global-controls .setting-label {
        font-size: 15px;
    }

    .global-controls .radio-label {
        font-size: 15px;
    }

    .global-controls .setting-radio-group {
        gap: 16px;
    }

    /* Removed - now using list-controls styling for both views */

    .btn {
        padding: 8px 14px;
        font-size: 15px;
        min-height: 42px;
        border-radius: 8px;
    }

    .point-time-display {
        flex: 1 1 auto;
        font-size: 15px;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 36px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
    }

    .point-intensity-display {
        flex: 0 0 60px;
        /* Increased for button styling */
        width: 60px;
        /* Explicit width to ensure consistency */
        min-width: 60px;
        /* Prevent shrinking */
        max-width: 60px;
        /* Prevent growing */
        font-size: 15px;
        box-sizing: border-box;
    }

    .point-intensity-btn .intensity-value {
        font-size: 15px;
    }

    .point-cct-display {
        flex: 0 0 65px;
        /* Increased to accommodate longer CCT values */
        font-size: 13px;
        min-height: 28px;
    }
}

/* List Controls - iOS Style */
.list-controls {
    background: #000000;
    padding: 0;
    margin: 0;
}

.controls-section {
    background: transparent;
    padding: 0 16px;
    margin-bottom: 20px;
}

.control-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.control-row:last-child {
    margin-bottom: 0;
}

.btn-full-width {
    flex: 1;
    border-radius: 10px;
    border: none;
    background: #2c2c2e;
    color: #007aff;
    font-size: 17px;
    font-weight: 500;
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
    cursor: pointer;
    letter-spacing: -0.24px;
}

.btn-half-width {
    flex: 1;
    border-radius: 10px;
    border: none;
    background: #2c2c2e;
    color: #007aff;
    font-size: 17px;
    font-weight: 500;
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
    letter-spacing: -0.24px;
}

.btn-primary.btn-full-width {
    background: #007aff;
    color: #ffffff;
    font-weight: 600;
}

.btn-secondary.btn-half-width {
    background: #2c2c2e;
    color: #007aff;
    font-weight: 500;
}

.btn-primary.btn-half-width {
    background: #007aff;
    color: #ffffff;
    font-weight: 600;
}

.btn-delete.btn-full-width,
.btn-delete.btn-half-width {
    background: #2c2c2e;
    color: #ff3b30;
    font-weight: 500;
}

.btn-delete.btn-half-width:hover {
    background: #3a3a3c;
}

.btn-delete:disabled,
.btn-delete.btn-half-width:disabled {
    color: #5a5a5e;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-delete:disabled:hover,
.btn-delete.btn-half-width:disabled:hover {
    background: #2c2c2e;
    opacity: 0.6;
}

.btn-full-width:hover {
    opacity: 0.85;
}

.btn-half-width:hover {
    opacity: 0.85;
}

.btn-full-width:active,
.btn-half-width:active {
    transform: scale(0.98);
    opacity: 0.7;
}

.btn-primary.btn-full-width:hover {
    background: #0051d5;
    opacity: 1;
}

.btn-secondary.btn-half-width:hover {
    background: #3a3a3c;
}

.btn-delete.btn-full-width:hover {
    background: #3a3a3c;
}

.btn-icon {
    font-size: 18px;
    opacity: 1;
}

.btn-text {
    font-size: 17px;
}

/* Light mode styling for control buttons */
@media (prefers-color-scheme: light) {

    .btn-full-width,
    .btn-half-width {
        background: #f2f2f7;
        color: #007aff;
    }

    .btn-primary.btn-full-width {
        background: #007aff;
        color: #ffffff;
    }

    .btn-secondary.btn-half-width {
        background: #f2f2f7;
        color: #007aff;
    }

    .btn-delete.btn-full-width {
        background: #f2f2f7;
        color: #ff3b30;
    }

    .btn-secondary.btn-half-width:hover,
    .btn-delete.btn-full-width:hover {
        background: #e5e5ea;
    }
}

/* Theme-based overrides */
.theme-light .btn-full-width,
.theme-light .btn-half-width {
    background: #f2f2f7;
    color: #007aff;
}

.theme-light .btn-primary.btn-full-width {
    background: #007aff;
    color: #ffffff;
}

.theme-light .btn-secondary.btn-half-width {
    background: #f2f2f7;
    color: #007aff;
}

.theme-light .btn-delete.btn-full-width {
    background: #f2f2f7;
    color: #ff3b30;
}

.theme-light .btn-secondary.btn-half-width:hover,
.theme-light .btn-delete.btn-full-width:hover {
    background: #e5e5ea;
}

/* Responsive Design for List Controls */
@media (max-width: 600px) {

    .btn-full-width,
    .btn-half-width {
        font-size: 16px;
        padding: 12px 14px;
        min-height: 46px;
        gap: 6px;
    }

    .btn-icon {
        font-size: 14px;
    }

    .btn-text {
        font-size: 16px;
    }
}

@media (max-width: 400px) {

    .btn-full-width,
    .btn-half-width {
        font-size: 15px;
        padding: 10px 12px;
        min-height: 42px;
        gap: 4px;
    }

    .btn-icon {
        font-size: 12px;
    }

    .btn-text {
        font-size: 15px;
    }
}

/* ==================== Split View Styles ==================== */

.split-container {
    position: relative;
    padding: 0;
    background: #000000;
}

.split-graph-section {
    margin-bottom: 2px;
}

.split-graph-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px 2px 8px;
}

.split-graph-label {
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.split-graph-unit {
    font-size: 10px;
    color: #636366;
}

.split-graph-area {
    position: relative;
    height: 150px;
    min-height: 120px;
    touch-action: none;
    -ms-touch-action: none;
    overflow: hidden;
}

.split-graph-area canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.split-time-labels {
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    font-size: 10px;
    color: #636366;
}

.split-time-line {
    /* Reuses .current-time-line base styles */
}

.split-time-vline {
    /* Reuses .current-time-vertical-line base styles */
}

.split-current-time-label {
    font-size: 11px;
    color: #ff3b30;
    text-align: right;
    padding: 2px 8px;
    font-weight: 500;
}

@media (max-width: 500px) {
    .split-graph-area {
        height: 130px;
        min-height: 100px;
    }
}

/* Drag Handle for List Reordering */
.point-drag-handle {
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    -ms-touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.point-drag-handle.disabled {
    cursor: default;
    opacity: 0.3;
}

.drag-grip {
    font-size: 16px;
    color: #8e8e93;
    line-height: 1;
}

/* Time display is clickable to edit */
.point-time-display {
    cursor: pointer;
}

/* Drag Clone (semi-transparent copy that follows pointer) */
.schedule-point-item.drag-clone {
    position: fixed;
    z-index: 1000;
    opacity: 0.85;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    background: #2c2c2e;
    width: auto;
}

/* Drop Indicator Line */
.list-drop-indicator {
    position: absolute;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #007aff;
    border-radius: 1px;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 0 4px rgba(0, 122, 255, 0.5);
}

/* ==================== SkySync List Item Styles ==================== */

.skysync-list-item {
    background: rgba(74, 173, 232, 0.08) !important;
    border-left: 3px solid #4AADE8;
}

.skysync-list-item:not(:last-child)::after {
    background: rgba(74, 173, 232, 0.3) !important;
}

.skysync-list-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    min-height: 36px;
    gap: 12px;
}

.skysync-list-icon {
    font-size: 18px;
    flex: 0 0 24px;
    text-align: center;
}

.skysync-list-label {
    color: #4AADE8;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.skysync-list-time {
    color: #8e8e93;
    font-size: 14px;
}

.skysync-time-text {
    cursor: pointer;
}

.skysync-time-text:hover {
    color: #4AADE8;
    text-decoration: underline;
}

.skysync-time-input {
    background: #1c1c1e;
    border: 1px solid #4AADE8;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    padding: 4px 8px;
    width: 150px;
    outline: none;
    color-scheme: dark;
}

.skysync-time-input:focus {
    border-color: #4AADE8;
    box-shadow: 0 0 0 1px rgba(74, 173, 232, 0.4);
    background: #2c2c2e;
}

.skysync-time-input::placeholder {
    color: #636366;
}

/* ==================== Split View Tooltip ==================== */

.split-tooltip {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 0;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(28, 28, 30, 0.95);
    border: 1px solid #48484a;
    border-radius: 6px;
    padding: 4px 10px;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
}

.split-tooltip-time {
    color: #ffffff;
}

.split-tooltip-time::after {
    content: ' · ';
    color: #636366;
}

.split-tooltip-values {
    color: #8e8e93;
}

.split-tooltip-intensity {
    color: #ffffff;
}

.split-tooltip-separator {
    margin: 0 3px;
    color: #636366;
}

.split-tooltip-cct {
    /* color set dynamically via JS */
}
