/**
 * WC Pre-Order Frontend Styles
 */

/* Pre-Order Badge */
.wc-preorder-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b6b;
    color: #fff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 10;
    letter-spacing: 0.5px;
}

.wc-preorder-badge-single {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    top: auto;
    left: auto;
}

/* Cart Badge */
.wc-preorder-cart-badge {
    background: #ff6b6b;
    color: #fff;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
    margin-right: 5px;
}

/* Pre-Order Info */
.wc-preorder-info {
    background: #fff8e5;
    border-left: 4px solid #ffba00;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.preorder-waiting-time {
    margin: 0 0 10px;
    color: #9d6300;
}

.preorder-note {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Countdown Timer */
.wc-preorder-countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
}

.countdown-label {
    margin: 0 0 15px;
    font-size: 14px;
    opacity: 0.9;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.countdown-item {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 5px;
    min-width: 60px;
}

.countdown-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.countdown-unit {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.8;
}

/* Payment Options */
.wc-preorder-payment-options {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.payment-options-label {
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
}

.payment-option {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: #0073aa;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.payment-option input[type="radio"] {
    margin: 0;
}

.payment-option input[type="radio"]:checked ~ .option-label {
    color: #0073aa;
    font-weight: 600;
}

.option-label {
    flex: 1;
    font-size: 14px;
}

.option-price {
    font-weight: 600;
    color: #28a745;
}

.option-savings {
    background: #28a745;
    color: #fff;
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 3px;
    margin-left: 5px;
}

.option-note {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    margin-left: 24px;
}

/* Shipping Option */
.wc-preorder-shipping-option {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.shipping-option-label {
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
}

.shipping-option {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shipping-option:hover {
    border-color: #0073aa;
}

.shipping-option:last-child {
    margin-bottom: 0;
}

.shipping-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
    flex-wrap: wrap;
}

.shipping-option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.shipping-option .option-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.shipping-option .option-label small {
    font-weight: 400;
    color: #666;
}

.shipping-option .option-price {
    font-weight: 600;
    color: #28a745;
}

.shipping-option .option-price.free-label {
    color: #28a745;
    background: #d4edda;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.shipping-option .option-note {
    display: block;
    width: 100%;
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    margin-left: 24px;
}

/* Price Display */
.wc-preorder-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
    margin-bottom: 15px;
}

.preorder-actual-price {
    font-size: 14px;
    color: #666;
}

.preorder-actual-price .woocommerce-Price-amount {
    font-weight: normal;
}

.preorder-price {
    font-size: 18px;
    color: #28a745;
}

.preorder-price .woocommerce-Price-amount {
    font-weight: bold;
    font-size: 20px;
}

.preorder-date {
    font-size: 14px;
    color: #9d6300;
    background: #fff8e5;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 5px;
}

.preorder-discount-badge {
    font-size: 13px;
    color: #155724;
    background: #d4edda;
    padding: 8px 12px;
    border-radius: 4px;
}

.inline-countdown {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

/* Legacy support */
.preorder-deposit-price,
.preorder-full-price {
    font-size: 14px;
}

.preorder-retail-price {
    color: #999;
    font-size: 13px;
}

/* Size Chart Link */
.wc-preorder-size-chart-link {
    display: inline-block;
    margin: 10px 0;
    color: #0073aa;
    text-decoration: underline;
    font-size: 14px;
}

.wc-preorder-size-chart-link:hover {
    color: #005177;
}

/* Size Chart Modal */
.wc-preorder-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

.modal-content h3 {
    margin: 0 0 20px;
}

.modal-content img {
    max-width: 100%;
    height: auto;
}

/* Checkout Pre-Order Summary */
.wc-preorder-remaining-total th,
.wc-preorder-remaining-total td {
    color: #dc3545 !important;
    font-weight: 600 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .countdown-timer {
        flex-wrap: wrap;
    }
    
    .countdown-item {
        min-width: 50px;
        padding: 8px 12px;
    }
    
    .countdown-value {
        font-size: 20px;
    }
    
    .payment-option label {
        flex-wrap: wrap;
    }
}
