/* general/css/product.css */
/* Product Page Specific Styles - Modals & Overrides */

/* --- 1. Confirmation Modal (Restored Architecture) --- */
.confirmation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.confirmation-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.confirmation-modal {
    background-color: #fff;
    width: 630px;
    height: 630px;
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirmation-modal-overlay.is-visible .confirmation-modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: linear-gradient(135deg, #1a3e6f, #153055);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.close-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 15px 25px 5px 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.plan-summary-card {
    background-color: #f8faff;
    border: 1px solid #e1e8fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #4a5568;
}

.summary-row .label {
    font-weight: 500;
}

.summary-row .value {
    font-weight: 600;
    color: #2d3748;
}

.summary-row .value.highlight {
    color: var(--color-primary);
}

.summary-divider {
    height: 1px;
    background-color: #e1e8fa;
    margin: 12px 0;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a3e6f;
    align-items: center;
}

.cost-breakdown-mini {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 12px;
    background-color: #fffaf0;
    border-left: 3px solid #ed8936;
    padding: 10px 15px;
    border-radius: 4px;
}

.cost-breakdown-mini p {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #c05621;
}

.cost-breakdown-mini ul {
    margin: 0;
    padding-left: 20px;
}

.promo-section-wrapper {
    margin-top: 10px;
}

.promo-input-container {
    display: flex;
    gap: 10px;
}

.promo-input-container input {
    flex-grow: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.promo-input-container input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.promo-input-container button {
    padding: 0 20px;
    background-color: #edf2f7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s;
}

.promo-input-container button:hover {
    background-color: #e2e8f0;
    color: #2d3748;
}

.promo-message {
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 500;
}

.promo-message.error {
    color: #e53e3e;
}

.promo-message.success {
    color: #38a169;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.modal-footer .btn-ghost {
    background-color: var(--color-secondary);
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.modal-footer .btn-ghost:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* Visibility classes */
.promo-label.desktop-only {
    display: inline-block;
}

@media (max-width: 768px) {
    .promo-label.desktop-only {
        display: none !important;
    }

    .confirmation-modal {
        width: 95vw;
        height: auto;
        min-height: 500px;
    }
}

/* --- 2. Cancellation Modal Styles --- */
.cancel-modal-icon {
    margin-bottom: 25px;
}

.cancel-modal-icon svg {
    width: 64px;
    height: 64px;
}

.cancel-modal-title {
    margin-bottom: 15px;
    font-size: 1.75rem;
    color: #333;
}

.cancel-modal-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 80%;
}

.cancel-modal-btn {
    min-width: 150px;
}

/* --- 3. Product Specific Spacing Overrides --- */
#confirmation-modal-content .modal-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
}

#confirmation-modal-content .summary-list {
    margin: 10px 0;
}

#confirmation-modal-content .promo-section {
    margin-top: 15px;
}

#confirmation-modal-content .modal-footer {
    margin-top: 15px;
    padding-top: 15px;
}

@media (max-width: 768px) {
    #confirmation-modal-content .modal-footer {
        justify-content: center;
    }

    #modal-confirm-btn,
    #modal-back-btn {
        padding: 10px 20px;
    }

    #confirmation-modal-content .promo-section label {
        display: none;
    }
}

/* --- 4. Special Variants --- */
.confirmation-modal--centered {
    height: auto;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}