/**
 * Workshop Booking - Frontend Styles (Calendar View)
 */

.wb-booking-form {
    max-width: 100%;
}

/* Duration Options */
.wb-field.wb-duration {
    margin-bottom: 30px;
}

.wb-field.wb-duration > label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Booking Notices */
.wb-booking-notices {
    margin: 20px 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wb-notice {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wb-notice::before {
    content: "ⓘ";
    font-size: 1.2em;
    font-weight: bold;
}

.wb-notice-error {
    background: #fee;
    border: 2px solid #fcc;
    color: #c33;
}

.wb-notice-error::before {
    content: "⚠";
    color: #c33;
}

.wb-notice-success {
    background: #efe;
    border: 2px solid #cfc;
    color: #3c3;
}

.wb-notice-success::before {
    content: "✓";
    color: #3c3;
}

.wb-duration-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wb-duration-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 100px;
}

.wb-duration-btn:hover {
    border-color: #333;
}

.wb-duration-btn.selected {
    background: #333;
    border-color: #333;
    color: #fff;
}

.wb-duration-price {
    font-size: 0.85em;
    opacity: 0.7;
}

/* Calendar Container */
.wb-calendar-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

/* Calendar */
.wb-calendar {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.wb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.wb-calendar-month {
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
    flex: 1;
    text-align: center;
}

.wb-calendar-nav {
    background: #146da9;
    border: 2px dashed #fff;
    font-size: 1.2em;
    cursor: pointer;
    color: #fff;
    width: 120px;
    height: 50px;
    min-width: 120px;
    padding: 0;
    border-radius: 100px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    font-weight: bold;
}

.wb-calendar-nav:hover {
    background: #0f5a8a;
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(20, 109, 169, 0.3);
}

.wb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.wb-calendar-weekdays span {
    font-size: 0.8em;
    color: #888;
    font-weight: 500;
    padding: 8px 0;
}

.wb-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.wb-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.wb-calendar-day:hover:not(.disabled):not(.empty) {
    background: #f5f5f5;
}

.wb-calendar-day.today {
    font-weight: 700;
    border: 2px solid #4a90d9;
}

.wb-calendar-day.today.has-slots {
    border: 2px solid #2e7d32;
}

.wb-calendar-day.selected {
    background: #4a90d9;
    color: #fff;
    font-weight: 600;
    border-color: #4a90d9;
}

.wb-calendar-day.disabled {
    color: #ddd;
    cursor: not-allowed;
    background: #fafafa;
}

.wb-calendar-day.empty {
    cursor: default;
}

.wb-calendar-day.has-slots {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

.wb-calendar-day.has-slots:hover {
    background: #c8e6c9;
}

.wb-calendar-day.has-slots.selected {
    background: #4a90d9;
    color: #fff;
}

.wb-calendar-day.no-slots:not(.disabled) {
    color: #aaa;
    background: #f5f5f5;
}

.wb-calendar-day.no-slots:not(.disabled):hover {
    background: #eee;
}

/* Calendar Legend */
.wb-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.75em;
    color: #666;
}

.wb-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wb-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.wb-legend-available .wb-legend-dot {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.wb-legend-unavailable .wb-legend-dot {
    background: #f5f5f5;
    border: 1px solid #ccc;
}

.wb-legend-today .wb-legend-dot {
    background: #fff;
    border: 2px solid #4a90d9;
}

/* Timeslots Panel */
.wb-timeslots-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.wb-timeslots-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: #999;
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wb-timeslots-placeholder p {
    margin: 0;
    font-size: 0.95em;
}

.wb-timeslots-content {
    width: 100%;
}

.wb-selected-date {
    font-weight: 600;
    font-size: 1.15em;
    color: #333;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a90d9;
}

.wb-timeslots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.wb-timeslot {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 1em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wb-timeslot:hover {
    border-color: #4a90d9;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wb-timeslot.selected {
    background: #4a90d9;
    border-color: #4a90d9;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74,144,217,0.3);
}

.wb-timeslot-time {
    font-weight: 600;
    font-size: 1.1em;
}

.wb-timeslot-remaining {
    font-size: 0.8em;
    color: #888;
    margin-top: 6px;
}

.wb-timeslot.selected .wb-timeslot-remaining {
    color: rgba(255,255,255,0.8);
}

.wb-no-timeslots {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

.wb-loading {
    text-align: center;
    color: #666;
    padding: 30px;
}

/* Booking Details (shown after time selection) */
.wb-booking-details {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.wb-field {
    margin-bottom: 25px;
}

.wb-field:last-child {
    margin-bottom: 0;
}

.wb-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quantity Selector */
.wb-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 180px;
}

.wb-qty-btn {
    background: #333;
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.4em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 15px !important;
}

.wb-qty-btn:hover {
    background: #555;
}

.wb-qty-minus {
    border-radius: 8px 0 0 8px;
}

.wb-qty-plus {
    border-radius: 0 8px 8px 0;
}

.wb-quantity-selector input {
    width: 80px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-left: none;
    border-right: none;
    border-radius: 0;
    height: 50px;
    font-size: 1.2em;
    font-weight: 600;
    padding: 0;
    appearance: textfield;
    -moz-appearance: textfield;
    background: #fff;
}

.wb-quantity-selector input::-webkit-outer-spin-button,
.wb-quantity-selector input::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.wb-participants-info {
    display: block;
    margin-top: 10px;
    font-size: 0.85em;
    color: #888;
}

/* Location Display */
.wb-location-display {
    background: #f8f9fa;
    padding: 14px 16px;
    border-radius: 8px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wb-location-display svg {
    flex-shrink: 0;
    color: #888;
}

/* Summary */
.wb-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.wb-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #333;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wb-summary-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
}

.wb-summary-label {
    color: #666;
}

.wb-summary-value {
    font-weight: 600;
    color: #333;
}

.wb-summary-price-row {
    padding-top: 10px;
    margin-top: 5px;
    border-top: 1px dashed #e2e8f0;
}

.wb-summary-total-row {
    padding-top: 10px;
    margin-top: 5px;
    border-top: 1px solid #e2e8f0;
}

.wb-summary-total-row .wb-summary-label,
.wb-summary-total-row .wb-summary-value {
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wb-booking-form {
        font-size: 15px;
    }
    
    .wb-calendar-container {
        padding: 15px;
        gap: 20px;
    }
    
    .wb-calendar {
        max-width: 100%;
    }
    
    .wb-calendar-days {
        gap: 4px;
    }
    
    .wb-calendar-day {
        height: 42px;
        font-size: 0.95em;
    }
    
    .wb-calendar-header {
        margin-bottom: 15px;
    }
    
    .wb-calendar-month {
        font-size: 1em;
    }
    
    .wb-calendar-legend {
        flex-direction: column;
        gap: 10px;
        font-size: 0.7em;
    }
    
    .wb-timeslots-panel {
        max-width: 100%;
    }
    
    .wb-timeslots-list {
        max-height: none;
        gap: 8px;
    }
    
    .wb-timeslot {
        padding: 14px 16px;
    }
    
    .wb-selected-date {
        font-size: 1em;
        padding: 12px 15px;
    }
    
    .wb-duration-btn {
        width: 100%;
        min-width: 100%;
    }
    
    .wb-booking-details {
        padding: 20px;
    }
    
    .wb-summary {
        padding: 15px;
    }
    
    .wb-quantity-selector {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .wb-calendar-container {
        padding: 10px;
        border-radius: 8px;
    }
    
    .wb-calendar-day {
        height: 38px;
        font-size: 0.9em;
    }
    
    .wb-calendar-weekdays span {
        font-size: 0.7em;
    }
    
    .wb-timeslot {
        padding: 12px 14px;
    }
    
    .wb-timeslot-time {
        font-size: 1em;
    }
    
    .wb-booking-details {
        padding: 15px;
    }
    
    .wb-duration-btn {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
}
