/* X-Style Premium Schedule Modal */
[v-cloak] {
    display: none !important;
}

.pubbox-schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    /* Changed to flex when Vue active */
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Force display flex when not hidden by v-if */
.pubbox-schedule-modal:not([v-cloak]) {
    display: flex;
}

.schedule-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.schedule-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #0f1419;
    max-height: 90vh;
    box-shadow: rgba(101, 119, 134, 0.2) 0px 0px 15px, rgba(101, 119, 134, 0.15) 0px 0px 3px 1px;
}

.schedule-modal-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 53px;
    border-bottom: 1px solid #eff3f4;
}

.schedule-modal-header .close-btn {
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #0f1419;
    cursor: pointer;
    margin-right: 20px;
    transition: background-color 0.2s;
}

.schedule-modal-header .close-btn:hover {
    background-color: rgba(15, 20, 25, 0.1);
}

.schedule-modal-header .title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    margin: 0;
    color: #0f1419;
}

.schedule-modal-header .confirm-btn {
    background-color: #0f1419;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 14px;
    padding: 0 16px;
    min-height: 32px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.schedule-modal-header .confirm-btn:hover {
    background-color: #272c30;
}

.schedule-modal-body {
    padding: 16px;
    overflow-y: auto;
}

.schedule-info {
    display: flex;
    align-items: center;
    color: #536471;
    font-size: 15px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.schedule-info svg {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.schedule-section {
    margin-bottom: 20px;
}

.schedule-section .section-label {
    display: block;
    font-size: 15px;
    font-weight: 400;
    color: #536471;
    margin-bottom: 12px;
}

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

.schedule-dropdown-group {
    position: relative;
    border: 1px solid #cfd9de;
    border-radius: 4px;
    background-color: transparent;
    transition: border-color 0.2s;
}

.schedule-dropdown-group:focus-within {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 1px #1d9bf0;
}

.schedule-dropdown-group label {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 13px;
    color: #536471;
    pointer-events: none;
    margin: 0;
}

.schedule-dropdown-group select {
    width: 100%;
    appearance: none;
    background: transparent;
    border: none;
    color: #0f1419;
    font-size: 17px;
    padding: 24px 32px 8px 8px;
    outline: none;
    cursor: pointer;
}

.schedule-dropdown-group select option {
    background-color: #ffffff;
    color: #0f1419;
}

.schedule-dropdown-group .dropdown-chevron {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #536471;
    pointer-events: none;
}

/* Specific widths for fields */
.date-month {
    flex: 2;
}

.date-day {
    flex: 1;
}

.date-year {
    flex: 1.5;
}

.time-hour {
    flex: 1;
}

.time-minute {
    flex: 1;
}

.time-ampm {
    flex: 1;
}

.timezone-display {
    font-size: 15px;
    color: #0f1419;
    padding: 4px 8px;
}

.schedule-modal-footer {
    padding: 16px;
    border-top: 1px solid #eff3f4;
}

.clear-schedule-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #f4212e;
    font-size: 15px;
    text-align: left;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.clear-schedule-btn:hover {
    background-color: rgba(244, 33, 46, 0.1);
}

/* Dark Mode Overrides */
body[data-bg="dark"] .schedule-modal-backdrop,
body[data-bg="dim"] .schedule-modal-backdrop {
    background-color: rgba(91, 112, 131, 0.4);
}

body[data-bg="dark"] .schedule-modal-content,
body[data-bg="dim"] .schedule-modal-content {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

body[data-bg="dark"] .schedule-modal-header,
body[data-bg="dim"] .schedule-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-bg="dark"] .schedule-modal-header .close-btn,
body[data-bg="dim"] .schedule-modal-header .close-btn {
    color: #ffffff;
}

body[data-bg="dark"] .schedule-modal-header .close-btn:hover,
body[data-bg="dim"] .schedule-modal-header .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body[data-bg="dark"] .schedule-modal-header .title,
body[data-bg="dim"] .schedule-modal-header .title {
    color: #ffffff;
}

body[data-bg="dark"] .schedule-modal-header .confirm-btn,
body[data-bg="dim"] .schedule-modal-header .confirm-btn {
    background-color: #eff3f4;
    color: #0f1419;
}

body[data-bg="dark"] .schedule-modal-header .confirm-btn:hover,
body[data-bg="dim"] .schedule-modal-header .confirm-btn:hover {
    background-color: #d7dbdc;
}

body[data-bg="dark"] .schedule-info,
body[data-bg="dim"] .schedule-info {
    color: #71767b;
}

body[data-bg="dark"] .schedule-section .section-label,
body[data-bg="dim"] .schedule-section .section-label {
    color: #71767b;
}

body[data-bg="dark"] .schedule-dropdown-group,
body[data-bg="dim"] .schedule-dropdown-group {
    border-color: #333639;
}

body[data-bg="dark"] .schedule-dropdown-group label,
body[data-bg="dim"] .schedule-dropdown-group label {
    color: #71767b;
}

body[data-bg="dark"] .schedule-dropdown-group select,
body[data-bg="dim"] .schedule-dropdown-group select {
    color: #ffffff;
}

body[data-bg="dark"] .schedule-dropdown-group select option,
body[data-bg="dim"] .schedule-dropdown-group select option {
    background-color: #000000;
    color: #ffffff;
}

body[data-bg="dark"] .schedule-dropdown-group .dropdown-chevron,
body[data-bg="dim"] .schedule-dropdown-group .dropdown-chevron {
    color: #71767b;
}

body[data-bg="dark"] .timezone-display,
body[data-bg="dim"] .timezone-display {
    color: #ffffff;
}

body[data-bg="dark"] .schedule-modal-footer,
body[data-bg="dim"] .schedule-modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Full screen on mobile */
@media (max-width: 1199.98px) {
    .pubbox-schedule-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        align-items: flex-start;
        z-index: 20000;
    }

    .schedule-modal-backdrop {
        display: none;
    }

    .schedule-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Inline Pubbox Schedule Display */
.timeline-pubbox__schedule-display {
    display: flex;
    align-items: center;
    color: #536471;
    font-size: 14px;
    padding: 8px 12px;
    background-color: rgba(29, 155, 240, 0.1);
    /* Slight blue tint */
    border-radius: 8px;
    margin: 12px 16px 0;
    font-weight: 500;
}

.timeline-pubbox__schedule-display svg {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    fill: #1d9bf0;
}

body[data-bg="dark"] .timeline-pubbox__schedule-display,
body[data-bg="dim"] .timeline-pubbox__schedule-display {
    color: #71767b;
    background-color: rgba(29, 155, 240, 0.15);
    /* Slightly brighter blue tint in dark mode */
}