/* ==========================================================================
   showtime-picker Component
   A self-contained component for showtime display and ticket selection.
   Classes are organized in DOM order for each render mode.
   ========================================================================== */

showtime-picker {
    font-size: 12px;
}

/* ==========================================================================
   Loading & Error States
   Rendered before data is loaded or when errors occur
   ========================================================================== */

.showtimePickerLoading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.showtimePickerError {
    padding: 12px;
    background-color: #fff9f9;
    border: 2px solid var(--red);
    border-radius: 4px;
    color: var(--red);
}

.showtimePickerEmpty {
    font-size: 14px;
    background-color: #fff9f9;
    border: 2px solid var(--red);
    padding: 10px;
}

.showtimePickerEmpty a {
    color: var(--red);
}

.showtimePickerEmpty a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   Order Mode
   DOM order:
   - .showtimePickerTitle (Tickets)
   - .showtimePickerTicketsContainer
     - .showtimePickerTicketsContainerLabel
       - .showtimePickerTicketsContainerLabelInput
       - .showtimePickerTicketsContainerLabelBody
   - .showtimePickerTitle (Showtimes)
   - .showtimePickerShowtimesContainer
     - .showtimePickerShowtimesContainerLabel
       - .showtimePickerShowtimesContainerLabelInput
       - .showtimePickerShowtimesContainerLabelBody
         - .showtimePickerShowtimesContainerLabelBodyCircle
           - .showtimePickerShowtimesContainerLabelBodyCircleInner
         - .showtimePickerShowtimesContainerLabelBodyDate
         - .showtimePickerShowtimesContainerLabelBodyBadge
   - .showtimePickerOrderButton
   ========================================================================== */

/* Title */
.showtimePickerTitle {
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Tickets Container */
.showtimePickerTicketsContainer {
    display: flex;
    flex-direction: row;
    gap: 0;
    margin-bottom: 16px;
}

.showtimePickerTicketsContainerLabel {
    cursor: pointer;
}

.showtimePickerTicketsContainerLabel.soldout {
    /*pointer-events: none;*/
}

.showtimePickerTicketsContainerLabelInput {
    display: none;
}

.showtimePickerTicketsContainerLabelBody {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f5f5f5;
    border: 1px solid lightgray;
    font-weight: 600;
}

.showtimePickerTicketsContainer .showtimePickerTicketsContainerLabel:first-child .showtimePickerTicketsContainerLabelBody {
    border-radius: 4px 0 0 4px;
}

.showtimePickerTicketsContainer .showtimePickerTicketsContainerLabel:last-child .showtimePickerTicketsContainerLabelBody {
    border-radius: 0 4px 4px 0;
}

.showtimePickerTicketsContainerLabelBody:hover {
    background-color: #eee;
}

.showtimePickerTicketsContainerLabelInput:checked + .showtimePickerTicketsContainerLabelBody {
    background-color: white;
    border: 1px solid var(--red);
}

.showtimePickerTicketsContainerLabel.soldout .showtimePickerTicketsContainerLabelBody {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Showtimes Container */
.showtimePickerShowtimesContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.showtimePickerShowtimesContainerLabel {
    cursor: pointer;
}

.showtimePickerShowtimesContainerLabel.soldout {
    /*pointer-events: none;*/
}

.showtimePickerShowtimesContainerLabelInput {
    display: none;
}

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

.showtimePickerShowtimesContainerLabelBodyWrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.showtimePickerShowtimesContainerLabelBody:hover {
    color: var(--red);
}

.showtimePickerShowtimesContainerLabel.soldout .showtimePickerShowtimesContainerLabelBodyCircle, .showtimePickerShowtimesContainerLabel.soldout .showtimePickerShowtimesContainerLabelBodyDate {
    opacity: 0.5;
}

.showtimePickerShowtimesContainerLabelBodyCircle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid lightgray;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.showtimePickerShowtimesContainerLabelInput:checked + .showtimePickerShowtimesContainerLabelBody .showtimePickerShowtimesContainerLabelBodyCircle {
    border-color: var(--red);
}

.showtimePickerShowtimesContainerLabelBodyCircleInner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--red);
    transform: scale(0);
    transition: transform 0.2s ease;
}

.showtimePickerShowtimesContainerLabelInput:checked + .showtimePickerShowtimesContainerLabelBody .showtimePickerShowtimesContainerLabelBodyCircleInner {
    transform: scale(1);
}

.showtimePickerShowtimesContainerLabelBodyDate {
}

.showtimePickerShowtimesContainerLabel.soldout .showtimePickerShowtimesContainerLabelBodyDate {
    text-decoration: line-through;
}

.showtimePickerShowtimesContainerLabelBodyBadge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.showtimePickerShowtimesContainerLabelBodyBadgeSoldout {
    background-color: var(--red);
    color: white;
    text-transform: uppercase;
    opacity: 0.5;
}

.showtimePickerShowtimesContainerLabelBodyBadgeLimited {
    background-color: #ffc107;
    color: #856404;
}

.showtimePickerShowtimesContainerLabelBodyWaitlist {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #266bd0;
    color: white;
    border: 0;
    text-transform: uppercase;
    line-height: 17px;
    display: block;
    transition: .3s ease;
}

.showtimePickerShowtimesContainerLabelBodyWaitlist:hover {
    background-color: #1b4f9c;
}


/* Order Button */
.showtimePickerOrderButton {
    margin-top: 16px;
}


/* ==========================================================================
   Links Mode
   DOM order:
   - .showtimePickerLinksContainer
     - .showtimePickerLinksContainerLink
       - .showtimePickerLinksContainerLinkDate
       - .showtimePickerLinksContainerLinkBadge
   ========================================================================== */

.showtimePickerLinksContainer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    align-items: center;
    text-align: center;
}

.showtimePickerLinksContainerLink {
    color: var(--red);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.showtimePickerLinksContainerLink:hover {
    text-decoration: underline;
}

.showtimePickerLinksContainerLink.soldout {
    /*opacity: 0.5;*/
}

.showtimePickerLinksContainerLinkDate {
}

.showtimePickerLinksContainerLink.soldout .showtimePickerLinksContainerLinkDate {
    text-decoration: line-through;
}

.showtimePickerLinksContainerLinkBadge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.showtimePickerLinksContainerLinkBadgeSoldout {
    background-color: var(--red);
    color: white;
    text-transform: uppercase;
}

.showtimePickerLinksContainerLinkBadgeLimited {
    background-color: #ffc107;
    color: #856404;
}
