/**
 * Photography Expeditions - Compact Booking Options
 * Based on the art-photography-wc compact option design
 */

/* Compact Option Base Styles */
.pew-compact-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    position: relative !important;
    background-color: #fff !important;
}

/* Hover effect removed */

.pew-compact-option.selected {
    border-color: #3498db;
    border-width: 2px;
    border-left-width: 5px;
    padding-left: 8px; /* Compensate for the wider border */
    background-color: #eef8ff !important;
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.7) !important;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

/* Hide actual radio button */
.pew-compact-option input[type="radio"],
.pew-compact-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: .5px;
    width: .5px;
    overflow: hidden;
}

/* Custom Radio Button */
.pew-compact-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    margin-top: 3px;
}

.pew-compact-radio .pew-custom-radio {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.2s;
}

.pew-compact-option.selected .pew-custom-radio {
    border-color: #3498db;
    border-width: 2px;
    transform: scale(1.1);
}

.pew-compact-option.selected .pew-custom-radio:after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3498db;
    display: block;
    box-shadow: 0 0 4px rgba(52, 152, 219, 0.5);
}

/* Custom Checkbox */
.pew-compact-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    margin-top: 3px;
}

.pew-compact-checkbox .pew-custom-checkbox {
    height: 16px;
    width: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.2s;
}

.pew-compact-option.selected .pew-custom-checkbox {
    border-color: #3498db;
    background: #3498db;
}

.pew-compact-option.selected .pew-custom-checkbox:after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
    display: block;
}

/* Option Content Container */
.pew-compact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Option Header with Label and Price */
.pew-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2px;
}

/* Option Title */
.pew-compact-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0;
}

/* Price Display */
.pew-compact-price {
    font-weight: 600;
    font-size: 14px;
    color: #3498db;
    white-space: nowrap;
    margin-left: 10px;
}

/* Option Description */
.pew-compact-description {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
}

/* Section Headers */
.pew-option-section {
    margin-bottom: 20px;
}

.pew-option-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Collapsible Sections */
.pew-collapsible-section {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.pew-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    /* background-color removed */
    cursor: pointer;
    position: relative;
}

.pew-section-header h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    border: none;
}

.pew-section-header {
    padding: 12px 15px;
    position: relative;
}

.pew-section-content {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: block;
}

.pew-section-header.active {
    border-bottom: none;
}

/* Remove any duplicate icons */
.pew-toggle-icon,
.collapse-indicator {
    display: none !important;
}

.pew-section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 15px;
    overflow: hidden;
}

.pew-toggle-icon:before,
.pew-toggle-icon:after {
    content: '';
    position: absolute;
    background-color: #3498db;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    margin-top: -1px;
}

.pew-toggle-icon:after {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.pew-collapsible-section.active .pew-toggle-icon:after {
    transform: rotate(0);
}

.pew-section-content {
    padding: 15px;
    display: none;
}

.pew-collapsible-section.active .pew-section-content {
    display: block;
}

/* Calendar Styles */
.date-picker-container {
    position: relative;
}

.pew-datepicker {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
}

.pew-dates-calendar {
    display: none;
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 5px;
}

/* Price summary section */
.pew-price-summary {
    padding: 0 !important;
    margin: 0 !important;
    border: none;
    box-shadow: none;
    background: none;
}

.pew-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.pew-price-row.total {
    font-size: 18px;
    font-weight: 600;
    color: #3498db;
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
}

/* Expedition form container */
.pew-booking-form,
.pew-expedition-form {
    max-width: 100%;
    padding: 0 !important;
    margin-bottom: 30px;
}

.pew-expedition-actions {
    margin-top: 20px;
}

.pew-expedition-actions .button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pew-expedition-actions .button:hover {
    background-color: #2980b9;
}

/* Price highlighting */
.pew-total-price-value {
    font-weight: bold;
    color: #3498db;
}

/* jQuery UI Datepicker customization */
.ui-datepicker {
    width: 100%;
    max-width: 350px;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ui-datepicker .ui-datepicker-header {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0;
}

.ui-datepicker .ui-datepicker-title {
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
}

.ui-datepicker th {
    background: #f7f7f7;
    color: #555;
    font-weight: 600;
    font-size: 12px;
}

.ui-datepicker td {
    padding: 0;
}

.ui-datepicker td span,
.ui-datepicker td a {
    text-align: center;
    padding: 8px;
    border: none !important;
    background: #fff !important;
    color: #555 !important;
}

.ui-datepicker td.ui-datepicker-today a {
    background: #f7f7f7 !important;
    font-weight: bold;
}

.ui-datepicker td.ui-datepicker-current-day a {
    background: #3498db !important;
    color: #fff !important;
}

.ui-datepicker td.pew-date-available a {
    background: #e8f7ff !important;
    color: #3498db !important;
    font-weight: bold;
}

.ui-datepicker td.pew-date-unavailable span {
    color: #ccc !important;
    text-decoration: line-through;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pew-booking-form {
        padding: 0 !important;
        margin: 10px 0 !important;
    }

    .pew-compact-option {
        padding: 12px !important;
        flex-direction: column !important;
    }

    .pew-compact-radio,
    .pew-compact-checkbox {
        margin-bottom: 10px;
        align-self: flex-start;
    }

    .pew-compact-content {
        width: 100%;
    }

    .pew-compact-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pew-compact-title {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .pew-compact-price {
        margin-left: 0;
        margin-bottom: 5px;
    }

    .pew-compact-description {
        font-size: 12px;
    }

    .pew-section-header {
        padding: 10px;
    }

    .pew-section-header h3 {
        font-size: 15px;
    }

    .pew-section-content {
        padding: 10px;
    }

    .pew-price-summary {
        padding: 12px;
        margin: 15px 0;
    }

    .pew-price-row {
        flex-direction: column;
        margin-bottom: 10px;
    }

    .pew-price-row.total {
        flex-direction: row;
    }

    .ui-datepicker {
        max-width: 100%;
    }

    .pew-booking-button {
        width: 100%;
        margin-top: 15px;
    }

    .pew-price-breakdown {
        width: 100%;
    }

    .pew-payment-details {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .pew-booking-form {
        padding: 0 !important;
        margin: 0 !important;
    }

    .pew-compact-option {
        padding: 12px !important;
        margin-bottom: 8px !important;
    }

    .pew-compact-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .pew-compact-description {
        font-size: 13px;
        line-height: 1.4;
    }

    .pew-section-header {
        padding: 12px !important;
    }

    .pew-section-header h3 {
        font-size: 15px;
        padding-right: 25px;
    }

    .pew-section-content {
        padding: 12px !important;
    }

    .pew-price-row.total {
        font-size: 16px;
        padding: 12px 0 0;
    }

    .pew-price-summary {
        margin: 15px 0;
        padding: 12px;
    }

    .pew-booking-button {
        width: 100%;
        margin: 10px 0;
    }

    /* Improve touch targets */
    .pew-section-header:after {
        width: 24px;
        height: 24px;
        line-height: 24px;
        text-align: center;
    }
}

/* Enrollment status indicators */
.pew-status-available {
    color: #27ae60;
    font-weight: 600;
}

.pew-status-limited {
    color: #f39c12;
    font-weight: 600;
}

.pew-status-almost-full {
    color: #e74c3c;
    font-weight: 600;
}