/* Shirly Art - Workshop Slot Selector (RTL-first, Premium UI) */

.shirlyart-slot-selector {
    direction: rtl !important;
    text-align: right !important;
    margin: 30px 0 !important;
    font-family: inherit;
    max-width: 600px;
}

.shirlyart-slot-selector *,
.shirlyart-slot-selector *::before,
.shirlyart-slot-selector *::after {
    box-sizing: border-box !important;
}

/* Reset theme overrides on our buttons — must be very specific */
.shirlyart-slot-selector button,
.shirlyart-slot-selector button.shirlyart-date-card,
.shirlyart-slot-selector button.shirlyart-time-btn,
.shirlyart-slot-selector button.shirlyart-scroll-btn,
.shirlyart-slot-selector .shirlyart-date-card,
.shirlyart-slot-selector .shirlyart-time-btn,
.shirlyart-slot-selector .shirlyart-scroll-btn {
    line-height: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Force hide WooCommerce default add-to-cart and quantity */
.shirlyart-slot-selector ~ .single_add_to_cart_button,
.shirlyart-slot-selector ~ .quantity,
form.cart .shirlyart-slot-selector ~ .single_add_to_cart_button,
form.cart .shirlyart-slot-selector ~ .quantity,
form.cart:has(.shirlyart-slot-selector) > .single_add_to_cart_button,
form.cart:has(.shirlyart-slot-selector) > .quantity {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ─── Sections ─── */
.shirlyart-section {
    background: #f9f9fb !important;
    border: 1px solid #ebebf0 !important;
    border-radius: 16px !important;
    padding: 22px !important;
    margin-bottom: 14px !important;
}

.shirlyart-section-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
}

.shirlyart-section-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: #d4a24e !important;
    color: #fff !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

.shirlyart-section-icon svg {
    stroke: #fff !important;
    fill: none !important;
    width: 20px !important;
    height: 20px !important;
}

.shirlyart-heading {
    font-size: 1.05em !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #2d2d2d !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* ─── Date cards horizontal scroll ─── */
.shirlyart-dates-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    direction: rtl !important;
}

.shirlyart-dates-track {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1 !important;
    padding: 6px 2px !important;
    direction: rtl !important;
    scroll-snap-type: x mandatory !important;
    position: relative !important;
}

.shirlyart-dates-track::-webkit-scrollbar {
    display: none;
}

.shirlyart-date-card {
    scroll-snap-align: start !important;
}


/* ─── Scroll arrows ─── */
.shirlyart-slot-selector .shirlyart-scroll-btn,
.shirlyart-slot-selector button.shirlyart-scroll-btn,
button.shirlyart-scroll-btn {
    flex-shrink: 0 !important;
    width: 38px !important;
    height: 38px !important;
    border: 1px solid #d8d8e0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #666 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    padding: 0 !important;
    min-width: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
}

.shirlyart-scroll-btn svg {
    stroke: #555 !important;
    fill: none !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

.shirlyart-scroll-btn:hover {
    background: #f0f0f5 !important;
    border-color: #bbb !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
}

.shirlyart-scroll-btn:hover svg {
    stroke: #333 !important;
}

/* ─── Date cards ─── */
.shirlyart-slot-selector .shirlyart-date-card,
.shirlyart-slot-selector button.shirlyart-date-card,
button.shirlyart-date-card {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 90px !important;
    height: 82px !important;
    border: 2px solid #e2e2ea !important;
    border-radius: 14px !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 10px 6px !important;
    margin: 0 !important;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
    overflow: hidden !important;
    color: #333 !important;
}

.shirlyart-date-card::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(135deg, rgba(212, 162, 78, 0.06), transparent) !important;
    opacity: 0 !important;
    transition: opacity 0.25s ease !important;
    pointer-events: none !important;
}

.shirlyart-slot-selector .shirlyart-date-card:hover,
button.shirlyart-date-card:hover {
    border-color: #d4a24e !important;
    box-shadow: 0 4px 14px rgba(212, 162, 78, 0.18) !important;
    transform: translateY(-2px) !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #333 !important;
}

.shirlyart-date-card:hover::after {
    opacity: 1 !important;
}

.shirlyart-slot-selector .shirlyart-date-card.active,
button.shirlyart-date-card.active,
.shirlyart-date-card.active {
    border-color: #d4a24e !important;
    background: linear-gradient(135deg, #d4a24e, #c4912e) !important;
    background-color: #d4a24e !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(212, 162, 78, 0.35) !important;
    transform: translateY(-2px) !important;
}

.shirlyart-date-card.active::after {
    opacity: 0 !important;
}

.shirlyart-day-name {
    font-size: 0.75em !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
    opacity: 0.8;
}

.shirlyart-date-card.active .shirlyart-day-name {
    opacity: 1;
    color: #fff !important;
}

.shirlyart-day-date {
    font-size: 1.15em !important;
    font-weight: 800 !important;
}

.shirlyart-date-card.active .shirlyart-day-date {
    color: #fff !important;
}

/* ─── Time slots ─── */
.shirlyart-times-section {
    opacity: 0 !important;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, padding 0.35s ease, margin 0.35s ease !important;
    pointer-events: none !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.shirlyart-times-section.visible {
    opacity: 1 !important;
    transform: translateY(0);
    pointer-events: auto !important;
    max-height: 600px !important;
    padding: 22px !important;
    margin-bottom: 14px !important;
    border: 1px solid #ebebf0 !important;
    overflow: visible !important;
}

.shirlyart-times-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    direction: rtl !important;
}

.shirlyart-slot-selector .shirlyart-time-btn,
.shirlyart-slot-selector button.shirlyart-time-btn,
button.shirlyart-time-btn {
    padding: 12px 8px !important;
    border: 2px solid #e2e2ea !important;
    border-radius: 12px !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    cursor: pointer !important;
    font-size: 1.05em !important;
    font-weight: 600 !important;
    font-family: inherit;
    direction: ltr !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03) !important;
    color: #444 !important;
    text-align: center !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.shirlyart-slot-selector .shirlyart-time-btn:hover,
.shirlyart-slot-selector button.shirlyart-time-btn:hover,
button.shirlyart-time-btn:hover {
    border-color: #d4a24e !important;
    background: #fdf8f0 !important;
    background-color: #fdf8f0 !important;
    background-image: none !important;
    color: #9a7530 !important;
    box-shadow: 0 4px 12px rgba(212, 162, 78, 0.12) !important;
    transform: translateY(-2px) !important;
}

.shirlyart-slot-selector .shirlyart-time-btn.active,
.shirlyart-slot-selector button.shirlyart-time-btn.active,
button.shirlyart-time-btn.active,
.shirlyart-times-grid .shirlyart-time-btn.active {
    border-color: #c4912e !important;
    background: linear-gradient(135deg, #d4a24e, #c4912e) !important;
    background-color: #d4a24e !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(212, 162, 78, 0.3), 0 0 0 3px rgba(212, 162, 78, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Disabled/unavailable time slots */
.shirlyart-slot-selector .shirlyart-time-btn.disabled,
button.shirlyart-time-btn.disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    background: #f3f3f6 !important;
    border-color: #e0e0e4 !important;
    color: #aaa !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}


/* ─── Selection summary ─── */
.shirlyart-selected-summary {
    display: none !important;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fdf6e8, #fef9f0) !important;
    border: 1.5px solid #e8d5a8 !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
    color: #9a7530 !important;
    animation: shirlyart-fadeIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 162, 78, 0.1) !important;
}

.shirlyart-selected-summary.visible {
    display: flex !important;
}

.shirlyart-summary-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    background: #d4a24e !important;
    color: #fff !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.shirlyart-summary-icon svg {
    stroke: #fff !important;
    fill: none !important;
    width: 16px !important;
    height: 16px !important;
}

.shirlyart-summary-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.shirlyart-summary-label {
    font-size: 0.78em !important;
    font-weight: 500 !important;
    color: #b08a40 !important;
    opacity: 0.85;
}

#shirlyart-summary-text {
    font-size: 1.05em !important;
    font-weight: 700 !important;
    color: #8a6a20 !important;
}

/* ─── CTA buttons ─── */
.shirlyart-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: 4px !important;
}

.shirlyart-cta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 16px 24px !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 1.05em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Primary CTA — Book (dominant) */
.shirlyart-cta-book {
    flex: 1.4 !important;
    background: linear-gradient(135deg, #d4a24e, #c4912e) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(212, 162, 78, 0.35) !important;
    font-size: 1.15em !important;
    padding: 18px 28px !important;
}

.shirlyart-cta-book::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent) !important;
    pointer-events: none !important;
}

.shirlyart-cta-book:not(.shirlyart-cta-disabled):hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 22px rgba(212, 162, 78, 0.5) !important;
    background: linear-gradient(135deg, #c4912e, #b07e22) !important;
}

.shirlyart-cta-book:not(.shirlyart-cta-disabled):active {
    transform: translateY(0) scale(0.98) !important;
}

.shirlyart-cta-book .shirlyart-cta-text {
    color: #fff !important;
}

.shirlyart-cta-book.shirlyart-cta-disabled {
    background: #c8c8d0 !important;
    color: #8e8e9a !important;
    cursor: pointer !important;
    transform: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.shirlyart-cta-book.shirlyart-cta-disabled::before {
    display: none !important;
}

.shirlyart-cta-book.shirlyart-cta-disabled .shirlyart-cta-text {
    color: #8e8e9a !important;
}

/* Secondary CTA — Gift (outline style) */
.shirlyart-cta-gift {
    flex: 1 !important;
    background: transparent !important;
    border: 2px solid #d4a24e !important;
    color: #c4912e !important;
    box-shadow: none !important;
}

.shirlyart-cta-gift::before {
    display: none !important;
}

.shirlyart-cta-gift:hover {
    background: #fdf8f0 !important;
    border-color: #c4912e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(212, 162, 78, 0.15) !important;
}

.shirlyart-cta-gift:active {
    transform: translateY(0) !important;
}

.shirlyart-cta-gift svg {
    stroke: #c4912e !important;
    fill: none !important;
}

.shirlyart-cta-gift .shirlyart-cta-text {
    color: #c4912e !important;
}

.shirlyart-cta-gift .shirlyart-cta-subtitle {
    color: #b08a40 !important;
    opacity: 0.8;
}

/* Gift button — two lines with subtitle */
.shirlyart-cta-gift-icon {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.shirlyart-cta-gift-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
}

.shirlyart-cta-subtitle {
    font-size: 0.72em !important;
    font-weight: 500 !important;
    opacity: 0.9;
    color: #fff !important;
}


/* ─── Animations ─── */
@keyframes shirlyart-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shirlyart-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

/* Disabled CTA hint tooltip */
.shirlyart-cta-book.shake {
    animation: shirlyart-shake 0.4s ease !important;
}

.shirlyart-book-hint {
    position: absolute !important;
    bottom: calc(100% + 8px) !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    background: #2d2d2d !important;
    color: #fff !important;
    font-size: 0.78em !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
    z-index: 10 !important;
}

.shirlyart-book-hint::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    border: 6px solid transparent !important;
    border-top-color: #2d2d2d !important;
}

.shirlyart-book-hint.visible {
    opacity: 1 !important;
}

@keyframes shirlyart-click {
    0% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.shirlyart-date-card:active:not(.active) {
    animation: shirlyart-click 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.shirlyart-time-btn:active:not(.active) {
    animation: shirlyart-click 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ─── Quantity selector ─── */
.shirlyart-qty-section {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 20px !important;
    background: #f9f9fb !important;
    border: 1px solid #ebebf0 !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
}

.shirlyart-qty-label {
    font-size: 0.95em !important;
    font-weight: 600 !important;
    color: #2d2d2d !important;
}

.shirlyart-qty-controls {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 2px solid #e2e2ea !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.shirlyart-qty-btn {
    width: 38px !important;
    height: 38px !important;
    border: none !important;
    background: #fff !important;
    cursor: pointer !important;
    font-size: 1.2em !important;
    font-weight: 700 !important;
    color: #d4a24e !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease !important;
    font-family: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.shirlyart-qty-btn:hover {
    background: #fdf8f0 !important;
}

.shirlyart-qty-btn:active {
    background: #f5ecd8 !important;
}

.shirlyart-qty-value {
    width: 40px !important;
    text-align: center !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    color: #2d2d2d !important;
    border-left: 1px solid #e2e2ea !important;
    border-right: 1px solid #e2e2ea !important;
    padding: 6px 0 !important;
    background: #fafafa !important;
}


/* ─── Mobile responsive ─── */
@media (max-width: 768px) {
    .shirlyart-slot-selector {
        margin: 16px 0 !important;
        max-width: 100% !important;
    }

    .shirlyart-section {
        padding: 14px !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .shirlyart-section-header {
        margin-bottom: 12px !important;
    }

    .shirlyart-section-icon {
        width: 30px !important;
        height: 30px !important;
    }

    .shirlyart-section-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .shirlyart-heading {
        font-size: 0.95em !important;
    }

    /* Dates wrapper — lock layout */
    .shirlyart-dates-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .shirlyart-dates-track {
        flex: 1 !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        gap: 8px !important;
    }

    /* Scroll buttons — MUST stay small on mobile */
    .shirlyart-slot-selector .shirlyart-scroll-btn,
    .shirlyart-slot-selector button.shirlyart-scroll-btn,
    button.shirlyart-scroll-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        flex: 0 0 28px !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    .shirlyart-scroll-btn svg {
        width: 12px !important;
        height: 12px !important;
    }

    /* Date cards on mobile — small enough to show 2+ */
    .shirlyart-slot-selector .shirlyart-date-card,
    .shirlyart-slot-selector button.shirlyart-date-card,
    button.shirlyart-date-card {
        width: calc((100vw - 140px) / 3) !important;
        min-width: 70px !important;
        max-width: 90px !important;
        height: 64px !important;
        padding: 6px 4px !important;
        border-radius: 10px !important;
    }

    .shirlyart-day-name {
        font-size: 0.7em !important;
    }

    .shirlyart-day-date {
        font-size: 1em !important;
    }

    .shirlyart-times-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .shirlyart-slot-selector .shirlyart-time-btn,
    .shirlyart-slot-selector button.shirlyart-time-btn,
    button.shirlyart-time-btn {
        padding: 12px 6px !important;
        font-size: 0.95em !important;
        border-radius: 10px !important;
    }

    /* CTA buttons — 2 columns same row */
    .shirlyart-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    .shirlyart-cta-book {
        flex: 1.3 !important;
        padding: 14px 10px !important;
        font-size: 0.95em !important;
        border-radius: 12px !important;
        gap: 6px !important;
    }

    .shirlyart-cta-gift {
        flex: 1 !important;
        padding: 12px 8px !important;
        font-size: 0.82em !important;
        border-radius: 12px !important;
        gap: 6px !important;
    }

    .shirlyart-qty-section {
        padding: 10px 14px !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .shirlyart-qty-label {
        font-size: 0.85em !important;
    }

    .shirlyart-qty-btn {
        width: 34px !important;
        height: 34px !important;
    }

    .shirlyart-cta-gift-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .shirlyart-cta-subtitle {
        font-size: 0.65em !important;
    }

    .shirlyart-selected-summary {
        padding: 10px 14px !important;
        font-size: 0.85em !important;
    }
}

@media (max-width: 380px) {
    .shirlyart-slot-selector .shirlyart-date-card,
    .shirlyart-slot-selector button.shirlyart-date-card,
    button.shirlyart-date-card {
        width: calc((100vw - 120px) / 3) !important;
        min-width: 60px !important;
        max-width: 80px !important;
        height: 58px !important;
    }

    .shirlyart-day-name {
        font-size: 0.65em !important;
    }

    .shirlyart-day-date {
        font-size: 0.9em !important;
    }

    .shirlyart-slot-selector .shirlyart-time-btn,
    button.shirlyart-time-btn {
        padding: 10px 4px !important;
        font-size: 0.9em !important;
    }

    .shirlyart-cta-book {
        padding: 12px 6px !important;
        font-size: 0.88em !important;
    }

    .shirlyart-cta-gift {
        padding: 10px 6px !important;
        font-size: 0.78em !important;
    }

    .shirlyart-cta-subtitle {
        font-size: 0.6em !important;
    }
}
