/**
 * Optional Offers Component CSS
 * Styling for optional offers selection in booking widget
 */

/* Optional Offers Container */
.pf-optional-offers {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pf-optional-offers h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #b8956a;
    padding-bottom: 8px;
}

/* Offers List */
.pf-offers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Offer Item */
.pf-offer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pf-offer-item:hover {
    border-color: #b8956a;
    box-shadow: 0 2px 8px rgba(184, 149, 106, 0.2);
    background-color: #fafafa;
}

.pf-offer-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: #b8956a;
    cursor: pointer;
}

.pf-offer-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-left: 5px;
}

.pf-offer-price {
    font-size: 16px;
    font-weight: 600;
    color: #b8956a;
    margin-left: 10px;
}

/* Selected State - Using JavaScript class instead of :has() for browser compatibility */
.pf-offer-item.pf-selected {
    border-color: #b8956a;
    background-color: #fff8f0;
    box-shadow: 0 2px 8px rgba(184, 149, 106, 0.3);
}

.pf-offer-item.pf-selected .pf-offer-label {
    color: #8b7355;
    font-weight: 600;
}

.pf-offer-item.pf-selected .pf-offer-price {
    color: #8b7355;
}

/* Breakdown Section Styling for Optional Offers */
.pf-breakdown-subheader {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #666 !important;
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid #eee !important;
    text-align: left !important;
    display: block !important;
    visibility: visible !important;
}

/* Ensure all breakdown elements are left-aligned */
.pf-breakdown-line .pf-breakdown-desc {
    text-align: left !important;
    justify-self: flex-start !important;
}

.pf-breakdown-line .pf-breakdown-amount {
    text-align: right !important;
    justify-self: flex-end !important;
}

/* Override any center alignment for breakdown sections */
.pf-price-breakdown * {
    text-align: left !important;
}

.pf-price-breakdown .pf-breakdown-line {
    text-align: left !important;
    justify-content: space-between !important;
}

.pf-price-breakdown .pf-breakdown-amount {
    text-align: right !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pf-optional-offers {
        margin: 1rem -4rem; /* EXACT same as other containers */
        padding: 15px;
        box-sizing: border-box;
    }
    
    .pf-optional-offers h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .pf-offers-list {
        gap: 10px;
    }
    
    .pf-offer-item {
        padding: 10px 12px;
        flex-direction: row;
        align-items: center;
    }
    
    .pf-offer-label {
        font-size: 14px;
    }
    
    .pf-offer-price {
        font-size: 14px;
        margin-left: 8px;
    }
    
    .pf-offer-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
    
    /* Mobile: Keep breakdown left-aligned for better readability */
    .pf-breakdown-subheader {
        font-size: 13px !important;
    }
    
    .pf-breakdown-line .pf-breakdown-desc {
        font-size: 13px !important;
    }
    
    .pf-breakdown-line .pf-breakdown-amount {
        font-size: 13px !important;
    }
}

/* Very Small Mobile Devices */
@media (max-width: 480px) {
    .pf-optional-offers {
        padding: 12px;
        box-sizing: border-box;
    }
    
    .pf-offer-item {
        padding: 8px 10px;
    }
    
    .pf-offer-label,
    .pf-offer-price {
        font-size: 13px;
    }
}

/* Very Small Screens - Match the missing breakpoint */
@media (max-width: 360px) {
    .pf-optional-offers {
        margin: 1rem -4.5rem; /* EXACT same as other containers */
        padding: 12px;
    }
}

/* High-DPI Display Compatibility */
@media (-webkit-min-device-pixel-ratio: 2) {
    .pf-offer-item input[type="checkbox"] {
        transform: scale(1.1);
    }
}

/* Focus States for Accessibility */
.pf-offer-item input[type="checkbox"]:focus {
    outline: 2px solid #b8956a;
    outline-offset: 2px;
}

.pf-offer-item:focus-within {
    border-color: #b8956a;
    box-shadow: 0 0 0 2px rgba(184, 149, 106, 0.2);
}

/* Animation for State Changes */
.pf-offer-item {
    transition: all 0.2s ease-in-out;
}

.pf-offer-price {
    transition: color 0.2s ease-in-out;
}

/* CozyStay Theme Compatibility - Force Visibility */
.pf-optional-offers,
.pf-offers-list,
.pf-offer-item,
.pf-offer-label,
.pf-offer-price {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: Arial, sans-serif !important;
    line-height: 1.4 !important;
}