/* WooCommerce Pre-Order Styles */

.wc-pre-order-message {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.wc-pre-order-notice {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.wc-pre-order-notice p {
    margin: 5px 0;
}

.wc-pre-order-notice strong {
    color: #0056b3;
}

.wc-pre-order-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-left: 10px;
}

.pre-order-release-date {
    color: #6c757d;
    font-style: italic;
}

.pre-order-available {
    color: #28a745 !important;
}

.wc-pre-order-delivery-notice {
    margin-bottom: 20px;
}

.wc-pre-order-delivery-notice p {
    margin: 0;
}

/* Shop loop badge */
.wc-pre-order-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}

/* Admin styles */
.wc-pre-order-meta-box .form-field {
    margin-bottom: 20px;
}

.wc-pre-order-meta-box .pre-order-fields {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

/* Cart and checkout styles */
.cart .pre-order-release-date,
.checkout .pre-order-release-date {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.cart .pre-order-badge,
.checkout .pre-order-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Order details styles */
.order-details .pre-order-release-date,
.order-details .pre-order-badge {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Cancellation request styles */
.wc-pre-order-cancellation-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.wc-pre-order-cancellation-section h3 {
    margin-top: 0;
    color: #333;
}

.wc-pre-order-request-cancellation {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.wc-pre-order-request-cancellation:hover {
    background: #c82333;
}

/* Modal styles */
.wc-pre-order-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-pre-order-modal {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.wc-pre-order-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.wc-pre-order-form-group {
    margin: 20px 0;
}

.wc-pre-order-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.wc-pre-order-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.wc-pre-order-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.wc-pre-order-submit-cancellation {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.wc-pre-order-submit-cancellation:hover:not(:disabled) {
    background: #c82333;
}

.wc-pre-order-submit-cancellation:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wc-pre-order-cancel-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.wc-pre-order-cancel-modal:hover {
    background: #5a6268;
}

/* Admin notice styles */
.wc-pre-order-admin-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

/* Compatibility styles for third-party plugins */
.pre-order-subscription-note,
.pre-order-bundle-note {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.wc-pre-order-compatibility-notice {
    background: #e3f2fd;
    border: 1px solid #81c784;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    font-size: 13px;
    color: #2e7d32;
}

.wc-pre-order-compatibility-notice.addon-notice {
    background: #fff3e0;
    border-color: #ffcc02;
    color: #e65100;
}

.wc-pre-order-compatibility-notice.bundle-notice {
    background: #f3e5f5;
    border-color: #ba68c8;
    color: #6a1b9a;
}

.wc-pre-order-compatibility-notice.subscription-notice {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

/* Product bundle compatibility styling */
.bundled_product .pre-order-badge {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 10px;
    font-size: 10px;
    padding: 2px 6px;
}

/* Product addons compatibility styling */
.product-addon .pre-order-notice {
    border-color: #ffc107;
    background: #fff8e1;
    color: #f57c00;
}

/* Subscription pre-order styling */
.subscription-details .pre-order-release-date {
    font-weight: 600;
    color: #4caf50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wc-pre-order-message,
    .wc-pre-order-notice {
        padding: 10px;
        font-size: 13px;
    }
    
    .wc-pre-order-badge {
        position: relative;
        top: auto;
        right: auto;
        margin: 5px 0;
        display: inline-block;
    }
    
    .wc-pre-order-modal {
        padding: 20px;
        width: 95%;
    }
    
    .wc-pre-order-modal-actions {
        flex-direction: column;
    }
    
    .wc-pre-order-modal-actions .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .wc-pre-order-compatibility-notice {
        padding: 8px;
        font-size: 12px;
    }
}