/**
 * Purchaseable Templates Styles
 *
 * These styles can be overridden by:
 * 1. Copying this file to your theme: yourtheme/smartbits-toolkit/assets/css/purchaseable.css
 * 2. Adding custom CSS to your theme's style.css
 * 3. Using WordPress Customizer > Additional CSS
 */

/* ========================================
   Event Purchase Box
   ======================================== */

.purchaseable-box {
    margin: 30px 0;
    padding: 25px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.purchaseable-box__header {
    margin-bottom: 20px;
}

.purchaseable-box__title {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 24px;
    color: #333;
}

.purchaseable-box__content {
    margin-bottom: 20px;
}

/* Event Info */
.event-info {
    margin-bottom: 15px;
}

.event-info__item {
    margin: 10px 0;
    font-size: 16px;
}

.event-info__label {
    font-weight: bold;
    margin-right: 8px;
}

.event-info__value {
    color: #555;
}

/* Price Display */
.purchaseable-box__price {
    font-size: 28px;
    font-weight: bold;
    margin: 20px 0;
    color: #2c3e50;
}

/* Stock Status */
.purchaseable-box__stock {
    margin: 10px 0;
    font-size: 14px;
    font-weight: bold;
}

.purchaseable-box__stock.in-stock {
    color: #27ae60;
}

.purchaseable-box__stock.out-of-stock {
    color: #e74c3c;
}

/* ========================================
   Event Variants (Multiple Dates)
   ======================================== */

.event-variants-wrapper {
    margin-bottom: 20px;
}

.event-variants__label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.event-variants {
    display: grid;
    gap: 10px;
}

.event-variant {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-variant:hover:not(.event-variant--soldout) {
    border-color: #888;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-variant--selected {
    border-color: #2c3e50 !important;
    box-shadow: 0 0 0 1px #2c3e50 !important;
    background: #fff;
}

.event-variant--soldout {
    opacity: 0.5;
    cursor: not-allowed;
}

.event-variant__label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    cursor: inherit;
}

.event-variant--soldout .event-variant__label {
    cursor: not-allowed;
}

.event-variant__radio {
    margin-top: 4px;
    flex-shrink: 0;
}

.event-variant__content {
    flex: 1;
}

.event-variant__date {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 6px;
}

.event-variant__location {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.event-variant__price {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin: 8px 0;
}

.event-variant__stock {
    font-size: 13px;
    margin-top: 6px;
}

.event-variant__stock.in-stock {
    color: #27ae60;
}

.event-variant__stock.out-of-stock {
    color: #e74c3c;
}

/* ========================================
   Form Elements
   ======================================== */

.event-form {
    margin-top: 20px;
}

.quantity-field {
    margin-bottom: 15px;
}

.quantity-field__label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.quantity-field__input {
    width: 80px;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Submit Button */
.purchaseable-box__submit {
    font-size: 18px;
    padding: 12px 30px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
    max-width: 300px;
}

.purchaseable-box__submit:hover {
    background: #1a252f;
}

.purchaseable-box__submit:active {
    transform: translateY(1px);
}

/* Sold Out Message */
.purchaseable-box__soldout {
    padding: 20px;
    text-align: center;
    background: #fee;
    border-radius: 5px;
}

.soldout-message {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
    margin: 0;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .purchaseable-box {
        padding: 20px;
    }

    .purchaseable-box__title {
        font-size: 20px;
    }

    .purchaseable-box__price {
        font-size: 24px;
    }

    .event-variant {
        padding: 12px;
    }

    .event-variant__date {
        font-size: 15px;
    }

    .event-variant__price {
        font-size: 18px;
    }

    .purchaseable-box__submit {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .purchaseable-box {
        padding: 15px;
        margin: 20px 0;
    }

    .event-info__item {
        font-size: 14px;
    }

    .quantity-field__input {
        width: 70px;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.event-variant__radio:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

.purchaseable-box__submit:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .purchaseable-box {
        border-color: #000;
    }

    .event-variant {
        border-color: #000;
    }

    .event-variant--selected {
        border-color: #000 !important;
        background: #ffff99;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .event-variant,
    .purchaseable-box__submit {
        transition: none;
    }
}

/* ========================================
   Addons Selection
   ======================================== */

.addons-selection-wrapper {
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.addons-selection__header {
    margin-bottom: 15px;
}

.addons-selection__title {
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.addons-selection__subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.addons-selection__list {
    display: grid;
    gap: 10px;
}

/* Addon Items */
.addon-item {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.addon-item:hover:not(.addon-item--unavailable) {
    border-color: #888;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.addon-item--selected {
    border-color: #2c3e50 !important;
    background: #f8f9fa;
    box-shadow: 0 0 0 1px #2c3e50 !important;
}

.addon-item--unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.addon-item__label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    cursor: inherit;
}

.addon-item--unavailable .addon-item__label {
    cursor: not-allowed;
}

.addon-item__checkbox-wrapper {
    flex-shrink: 0;
    padding-top: 2px;
}

.addon-item__checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.addon-item--unavailable .addon-item__checkbox {
    cursor: not-allowed;
}

.addon-item__content {
    flex: 1;
}

.addon-item__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.addon-item__name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.addon-item__price {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}

.addon-item__description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-top: 6px;
}

/* ========================================
   Addons Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .addons-selection-wrapper {
        padding: 15px;
    }

    .addons-selection__title {
        font-size: 16px;
    }

    .addon-item {
        padding: 10px 12px;
    }

    .addon-item__name {
        font-size: 14px;
    }

    .addon-item__price {
        font-size: 15px;
    }

    .addon-item__description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .addons-selection-wrapper {
        padding: 12px;
    }

    .addon-item__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .addon-item__checkbox {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   Addons Accessibility
   ======================================== */

.addon-item__checkbox:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .addon-item {
        border-color: #000;
    }

    .addon-item--selected {
        border-color: #000 !important;
        background: #ffff99;
    }
}

/* Reduced Motion Support for Addons */
@media (prefers-reduced-motion: reduce) {
    .addon-item {
        transition: none;
    }
}
