/**
 * Frontend Experience Slot Selector CSS (v3.2.0)
 * Material Design 3 styling for slot picker component
 */

/* ============================================================================
   Slot Selector Container
   ========================================================================= */

.rdbg-exp-slot-selector {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* ============================================================================
   Sections
   ========================================================================= */

.selector-section {
    margin-bottom: 24px;
}

.selector-section:last-child {
    margin-bottom: 0;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 12px;
}

.selector-label i {
    font-size: 18px;
    color: #5f6368;
}

.selector-help {
    font-size: 12px;
    color: #5f6368;
    margin-top: 8px;
    line-height: 1.4;
}

/* ============================================================================
   Date Picker
   ========================================================================= */

.exp-date-picker {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.exp-date-picker:hover {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.exp-date-picker:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.15);
}

/* ============================================================================
   Slots Container
   ========================================================================= */

.slots-container {
    position: relative;
    min-height: 100px;
}

/* Slots Grid */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (max-width: 600px) {
    .slots-grid {
        grid-template-columns: 1fr;
    }
}

/* Slot Chip (MD3 style) */
.slot-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border-radius: 12px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 80px;
}

/* Slot States */
.slot-chip[data-status="available"] {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #1b5e20;
}

.slot-chip[data-status="available"]:hover {
    background: #c8e6c9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.slot-chip[data-status="low"] {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.slot-chip[data-status="low"]:hover {
    background: #ffe0b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.2);
}

.slot-chip[data-status="sold_out"] {
    background: #f5f5f5;
    border-color: #9e9e9e;
    color: #757575;
    cursor: not-allowed;
    opacity: 0.6;
}

.slot-chip.selected {
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.15);
}

.slot-chip[data-status="available"].selected {
    background: #4caf50;
    border-color: #2e7d32;
    color: #ffffff;
}

.slot-chip[data-status="low"].selected {
    background: #ff9800;
    border-color: #f57c00;
    color: #ffffff;
}

/* Slot Time */
.slot-time {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Slot Badge */
.slot-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slot-chip[data-status="available"] .slot-badge {
    background: rgba(27, 94, 32, 0.15);
    color: #1b5e20;
}

.slot-chip[data-status="low"] .slot-badge {
    background: rgba(230, 81, 0, 0.15);
    color: #e65100;
}

.slot-chip[data-status="sold_out"] .slot-badge {
    background: rgba(117, 117, 117, 0.15);
    color: #757575;
}

/* ============================================================================
   Loading & Empty States
   ========================================================================= */

.slots-loading,
.slots-empty-state,
.slots-error {
    text-align: center;
    padding: 32px 16px;
}

.slots-loading i,
.slots-empty-state i,
.slots-error i {
    font-size: 48px;
    color: #9e9e9e;
    margin-bottom: 12px;
    display: block;
}

.slots-error i {
    color: #d32f2f;
}

.slots-empty-state p,
.slots-error p {
    color: #5f6368;
    margin: 0;
}

.slots-error .error-message {
    color: #d32f2f;
    font-weight: 500;
}

/* Skeleton Loader */
.skeleton-slot {
    height: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 12px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================================================
   Quantity Stepper
   ========================================================================= */

.quantity-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #1976d2;
    background: #ffffff;
    color: #1976d2;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover:not(:disabled) {
    background: #1976d2;
    color: #ffffff;
    transform: scale(1.1);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    width: 60px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 4px;
    pointer-events: none;
}

/* ============================================================================
   CTA Button
   ========================================================================= */

.rdbg-exp-cta-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: #1976d2;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.rdbg-exp-cta-btn:hover:not(:disabled) {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

.rdbg-exp-cta-btn:active:not(:disabled) {
    transform: translateY(0);
}

.rdbg-exp-cta-btn:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    box-shadow: none;
}

.rdbg-exp-cta-btn i {
    font-size: 20px;
}

/* Request mode styling */
.rdbg-exp-cta-btn[data-action="submit-request"] {
    background: #43a047;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.rdbg-exp-cta-btn[data-action="submit-request"]:hover:not(:disabled) {
    background: #388e3c;
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.4);
}

/* ============================================================================
   Success Message
   ========================================================================= */

.selector-success {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
}

.selector-success i {
    font-size: 32px;
    color: #4caf50;
    display: block;
    margin-bottom: 8px;
}

.selector-success .success-message {
    color: #1b5e20;
    font-weight: 500;
    margin: 0;
}

/* ============================================================================
   Notice
   ========================================================================= */

.rdbg-exp-notice {
    background: #fff3e0;
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 12px 16px;
    color: #e65100;
    font-size: 14px;
    margin: 0;
}

/* ============================================================================
   Responsive Adjustments
   ========================================================================= */

@media (max-width: 600px) {
    .rdbg-exp-slot-selector {
        padding: 16px;
    }

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

    .slot-chip {
        min-height: 70px;
        padding: 12px 8px;
    }

    .slot-time {
        font-size: 16px;
    }

    .rdbg-exp-cta-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}