/* ============================================
   SYNCSALE Calendar Modal
   ============================================ */

/* Overlay */
.ssc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ssc-overlay.ssc-active {
    opacity: 1;
    visibility: visible;
}

/* Modal container */
.ssc-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-width: 460px;
    width: 94vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ssc-modal
{
    overflow: hidden;
}

/* Close button */
.ssc-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    z-index: 10;
    line-height: 1;
    padding: 4px;
    transition: color 0.15s;
}

.ssc-close:hover {
    color: #333;
}

/* ---- LEFT PANEL: Calendar ---- */
.ssc-calendar-panel {
    flex: none;
    padding: 32px 28px 28px;
    min-width: 0;
}

/* Title */
.ssc-title {
    font-family: 'ClashGrotesk-Medium', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #1a1a2e;
    margin: 0 0 24px 0;
}

/* Month nav */
.ssc-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.ssc-month-nav button {
    background: none;
    border: 2px solid #e0e4ea;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #3366ff;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
}

.ssc-month-nav button:hover {
    background: #f0f4ff;
    border-color: #3366ff;
}

.ssc-month-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    min-width: 150px;
    text-align: center;
}

/* Days of week header */
.ssc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    margin-bottom: 6px;
}

.ssc-weekday {
    text-align: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    padding: 6px 0;
    letter-spacing: 0.5px;
}

/* Calendar grid */
.ssc-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.ssc-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: none;
    padding: 0;
    position: relative;
}

.ssc-day:hover:not(.ssc-day-disabled):not(.ssc-day-empty) {
    background: #e8eeff;
}

.ssc-day.ssc-day-empty {
    cursor: default;
}

.ssc-day.ssc-day-disabled {
    color: #ccc;
    cursor: default;
}

.ssc-day.ssc-day-fully-booked {
    cursor: default;
    pointer-events: auto !important;
}

.ssc-day.ssc-day-available {
    color: #3366ff;
    font-weight: 700;
}

.ssc-day.ssc-day-available:hover {
    background: #dce6ff;
}

.ssc-day.ssc-day-selected {
    background: #3366ff;
    color: #fff;
    font-weight: 700;
}

.ssc-day.ssc-day-selected:hover {
    background: #2952cc;
}

.ssc-day.ssc-day-today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1a1a2e;
}

.ssc-day.ssc-day-selected.ssc-day-today::after {
    background: #fff;
}

/* Timezone */
.ssc-timezone {
    margin-top: 18px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ssc-timezone svg {
    width: 16px;
    height: 16px;
    fill: #888;
}

/* ---- TIME PANEL (step view, replaces calendar) ---- */
.ssc-time-panel {
    display: none;
    flex-direction: column;
    padding: 32px 28px 28px;
    width: 100%;
    overflow-y: auto;
}

.ssc-time-back-mobile {
    display: block;
    background: none;
    border: 2px solid #e0e4ea;
    border-radius: 8px;
    padding: 10px 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    width: 100%;
    margin: 20px 0 16px 0;
    transition: border-color 0.15s, color 0.15s;
}

.ssc-time-back-mobile:hover {
    border-color: #3366ff;
    color: #3366ff;
}

.ssc-time-date-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
    white-space: nowrap;
}

.ssc-slots-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.ssc-slot {
    border: 2px solid #3366ff;
    border-radius: 8px;
    padding: 12px 0;
    text-align: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #3366ff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    background: none;
    width: 100%;
}

.ssc-slot:hover {
    background: #3366ff;
    color: #fff;
}

/* ---- BOOKING FORM ---- */
.ssc-booking-form {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 32px 28px 28px;
    width: 100%;
}

.ssc-booking-form.ssc-form-active {
    display: flex;
}

.ssc-form-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.ssc-form-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.ssc-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ssc-form-group label {
    font-family: 'Questrial', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.ssc-required {
    color: #e53935;
    font-size: 11px;
    margin-left: 1px;
}

.ssc-form-group input {
    border: 2px solid #e0e4ea;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.ssc-form-group input:focus {
    border-color: #3366ff;
}

.ssc-form-submit {
    background: #3366ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

.ssc-form-submit:hover {
    background: #2952cc;
}

.ssc-form-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.ssc-form-back {
    background: none;
    border: 2px solid #e0e4ea;
    border-radius: 8px;
    padding: 10px 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.ssc-form-back:hover {
    border-color: #3366ff;
    color: #3366ff;
}

/* ---- SUCCESS STATE ---- */
.ssc-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
    text-align: center;
    width: 100%;
}

.ssc-success.ssc-success-active {
    display: flex;
}

.ssc-success-icon {
    width: 64px;
    height: 64px;
    background: #e6ffe6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.ssc-success-icon svg {
    width: 32px;
    height: 32px;
    fill: #22c55e;
}

.ssc-success h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.ssc-success p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
}

.ssc-success-close {
    background: #3366ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ssc-success-close:hover {
    background: #2952cc;
}

/* Error message */
.ssc-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c00;
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'IBM Plex Sans', sans-serif;
    display: none;
}

.ssc-error.ssc-error-visible {
    display: block;
}

/* Powered by badge (top right corner) */
.ssc-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #3366ff;
    color: #fff;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 0 12px 0 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.3;
    text-align: center;
}

/* Scrollbar for time slots */
.ssc-slots-list::-webkit-scrollbar {
    width: 4px;
}

.ssc-slots-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.ssc-slots-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .ssc-modal {
        max-width: 96vw;
    }

    .ssc-calendar-panel {
        padding: 24px 18px 18px;
    }

    .ssc-time-panel {
        padding: 24px 18px 18px;
    }
}

/* Tippy tooltip */
.tippy-content {
    font-family: 'Questrial', sans-serif;
    font-weight: 400;
}

/* Consent checkbox */
.ssc-consent-group {
    margin: 12px 0 16px;
}
.ssc-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.5;
    color: #555;
    font-weight: 400;
}
.ssc-consent-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: #3366ff;
    cursor: pointer;
}
.ssc-consent-label a {
    color: #3366ff;
    text-decoration: underline;
}
