/**
 * PHYZ Pricing Modal - Styles
 */

/* ==========================================================================
   VARIABLES
   ========================================================================== */
:root {
    --phyz-primary: #53A10F;
    --phyz-primary-dark: #1B5E20;
    --phyz-primary-light: #4CAF50;
    --phyz-gray-50: #FAFAFA;
    --phyz-gray-100: #F5F5F5;
    --phyz-gray-200: #EEEEEE;
    --phyz-gray-300: #E0E0E0;
    --phyz-gray-500: #9E9E9E;
    --phyz-gray-600: #757575;
    --phyz-gray-800: #424242;
    --phyz-white: #FFFFFF;
    --phyz-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --phyz-radius: 12px;
    --phyz-radius-sm: 8px;
}

/* ==========================================================================
   BODY LOCK
   ========================================================================== */
body.phyz-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   OVERLAY
   ========================================================================== */
.phyz-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.phyz-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.phyz-modal {
    position: relative;
    background: var(--phyz-white);
    border-radius: var(--phyz-radius);
    box-shadow: var(--phyz-shadow);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.phyz-modal-overlay.active .phyz-modal {
    transform: translateY(0);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.phyz-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--phyz-gray-200);
}

.phyz-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--phyz-gray-800);
}

.phyz-modal-header h2 span {
    color: var(--phyz-primary);
}

.phyz-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--phyz-gray-100);
    border-radius: 50%;
    font-size: 20px;
    color: var(--phyz-gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.phyz-modal-close:hover {
    background: var(--phyz-gray-200);
    color: var(--phyz-gray-800);
}

/* ==========================================================================
   BODY
   ========================================================================== */
.phyz-modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

/* Option Block */
.phyz-option-block {
    background: var(--phyz-gray-50);
    border: 1px solid var(--phyz-gray-200);
    border-radius: var(--phyz-radius-sm);
    padding: 20px;
    margin-bottom: 15px;
}

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

.option-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.option-icon {
    font-size: 24px;
    line-height: 1;
}

.option-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--phyz-gray-800);
}

.option-info p {
    margin: 0;
    font-size: 13px;
    color: var(--phyz-gray-600);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.qty-label {
    font-size: 14px;
    color: var(--phyz-gray-800);
    min-width: 140px;
}

.qty-controls {
    display: flex;
    align-items: center;
    background: var(--phyz-white);
    border: 1px solid var(--phyz-gray-300);
    border-radius: var(--phyz-radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 500;
    color: var(--phyz-gray-600);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.qty-btn:hover {
    background: var(--phyz-gray-100);
    color: var(--phyz-primary);
}

.qty-controls input {
    width: 45px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--phyz-gray-200);
    border-right: 1px solid var(--phyz-gray-200);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--phyz-gray-800);
    background: var(--phyz-white);
}

.qty-price {
    font-size: 13px;
    color: var(--phyz-primary);
    font-weight: 500;
    margin-left: auto;
}

/* Included Feature */
.included-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: var(--phyz-radius-sm);
    font-size: 14px;
    color: var(--phyz-primary-dark);
}

.check-icon {
    font-size: 18px;
    font-weight: bold;
}

/* Checkbox Selector */
.checkbox-selector {
    padding: 5px 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 0;
}

.custom-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #53A10F;
    cursor: pointer;
    border: 1px solid #53A10F !important;
}

.checkbox-text {
    flex: 1;
    color: var(--phyz-gray-800);
}

.checkbox-price {
    font-weight: 600;
    color: var(--phyz-primary);
}

/* ==========================================================================
   SUMMARY
   ========================================================================== */
.phyz-modal-summary {
    background: var(--phyz-gray-100);
    padding: 20px 25px;
    border-top: 1px solid var(--phyz-gray-200);
}

.summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--phyz-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--phyz-gray-800);
    border-bottom: 1px solid var(--phyz-gray-200);
}

.summary-line:last-child {
    border-bottom: none;
}

.summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid var(--phyz-gray-300);
}

.summary-total span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--phyz-gray-800);
}

#modal-total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--phyz-primary);
}

.total-period {
    font-size: 14px;
    color: var(--phyz-gray-600);
    margin-left: 4px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.phyz-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    border-top:none;
}

.btn-cancel {
    flex: 0 0 auto;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    background: var(--phyz-white);
    border: 1px solid var(--phyz-gray-300);
    border-radius: var(--phyz-radius-sm);
    color: var(--phyz-gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--phyz-gray-100);
    color: var(--phyz-gray-800);
}

.btn-validate {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    background: var(--phyz-primary);
    border: none;
    border-radius: var(--phyz-radius-sm);
    color: var(--phyz-white);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-validate:hover {
    background: var(--phyz-primary-dark);
}

.btn-validate:disabled {
    background: var(--phyz-gray-300);
    cursor: not-allowed;
}

/* ==========================================================================
   LOADER
   ========================================================================== */
.phyz-modal-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.phyz-modal-loader.active,
.phyz-modal-loader[style*="display: block"] {
    display: flex !important;
}



/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 480px) {
    .phyz-modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .phyz-modal {
        max-height: 95vh;
        border-radius: var(--phyz-radius) var(--phyz-radius) 0 0;
    }

    .phyz-modal-header,
    .phyz-modal-body,
    .phyz-modal-summary,
    .phyz-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .qty-price {
        margin-left: 0;
    }

    .phyz-modal-footer {
        flex-direction: column;
    }

    .btn-cancel {
        order: 2;
    }

    .btn-validate {
        order: 1;
    }
}