/**
 * PlaneMAX Pricing Calculator Styles
 *
 * @package AV8_Elementor_Components
 * @since 1.7.0
 */

/* ==================================
   CSS Variables - AV8 Design System
   ================================== */

.av8-planemax-calculator {
    --av8-primary: #1B449D;
    --av8-primary-dark: #0f2a5f;
    --av8-accent-green: #71B63B;
    --av8-accent-green-light: #f0f9eb;
    --av8-accent-green-dark: #5a8b30;
    --av8-accent-blue: #00aeff;
    --av8-grey: #C0C0C0;
    --av8-black: #222222;
    --av8-white: #ffffff;

    font-family: 'Montserrat', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.av8-planemax-calculator *,
.av8-planemax-calculator *::before,
.av8-planemax-calculator *::after {
    box-sizing: border-box;
}

.av8-planemax-calculator h1,
.av8-planemax-calculator h2,
.av8-planemax-calculator h3,
.av8-planemax-calculator h4 {
    font-family: 'B612', sans-serif;
}

/* ==================================
   Header Section
   ================================== */

.planemax-header {
    text-align: center;
    margin-bottom: 48px;
}

.planemax-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--av8-primary);
    margin: 0 0 8px 0;
}

.planemax-subtitle {
    font-size: 20px;
    color: #6b7280;
    margin: 0;
}

/* ==================================
   Pricing Grid
   ================================== */

.planemax-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 32px;
    align-items: start;
}

@media (max-width: 992px) {
    .planemax-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================================
   Card Styles
   ================================== */

.planemax-card {
    background: var(--av8-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 32px;
    position: relative;
}

.planemax-card-business {
    border-top: 4px solid var(--av8-primary);
}

.planemax-card-enterprise {
    background: var(--av8-primary);
    color: var(--av8-white);
}

.planemax-card-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.planemax-card-business .planemax-card-title {
    color: var(--av8-primary);
}

.planemax-card-description {
    font-size: 16px;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.planemax-card-business .planemax-card-description {
    color: #6b7280;
}

.planemax-card-enterprise .planemax-card-description {
    color: #bfdbfe;
}

/* ==================================
   Promo Notice
   ================================== */

.planemax-promo-notice {
    font-size: 12px;
    color: var(--av8-accent-green-dark);
    font-weight: 600;
    text-align: right;
    margin: 0 0 8px 0;
}

.planemax-promo-notice.hidden {
    display: none;
}

/* ==================================
   Period Selector (Card Style)
   ================================== */

.planemax-period-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.planemax-period-btn {
    position: relative;
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: var(--av8-white);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}

.planemax-period-btn:hover:not(.active) {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.planemax-period-btn.active {
    border-color: var(--av8-accent-green);
    background: linear-gradient(to bottom, var(--av8-accent-green-light), var(--av8-white));
    box-shadow: 0 4px 12px rgba(113, 182, 59, 0.2);
}

.planemax-period-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 2px;
}

.planemax-period-btn.active .planemax-period-title {
    color: var(--av8-accent-green-dark);
}

.planemax-period-subtitle {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.planemax-period-btn.active .planemax-period-subtitle {
    color: var(--av8-accent-green);
}

.planemax-period-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: var(--av8-white);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.planemax-period-badge.hidden {
    display: none;
}

/* ==================================
   Price Display
   ================================== */

.planemax-price-container {
    margin: 24px 0;
    padding: 16px;
    background: var(--av8-accent-green-light);
    border-radius: 12px;
}

.planemax-price-label {
    font-size: 16px;
    color: var(--av8-accent-green-dark);
    font-weight: 600;
    margin: 0 0 12px 0;
}

.planemax-price-display {
    margin-bottom: 8px;
}

.planemax-price-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.planemax-price-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--av8-accent-green);
    line-height: 1;
}

.planemax-price-period {
    font-size: 20px;
    color: #6b7280;
    margin-left: 8px;
}

.planemax-total-cost {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

.planemax-total-cost.hidden {
    display: none;
}

.planemax-savings {
    color: var(--av8-accent-green);
    font-weight: 600;
}

.planemax-discount-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--av8-accent-green-dark);
    margin-top: 8px;
}

.planemax-discount-info.hidden {
    display: none;
}

/* ==================================
   Setup Fee Section
   ================================== */

.planemax-setup-fee {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(113, 182, 59, 0.2);
}

.planemax-setup-fee-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.planemax-setup-fee-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}

.planemax-setup-fee-values {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planemax-setup-fee-original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.planemax-setup-fee-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--av8-accent-green);
}

.planemax-setup-fee-note {
    font-size: 12px;
    color: var(--av8-accent-green-dark);
    font-weight: 600;
    text-align: right;
    margin: 4px 0 0 0;
}

/* ==================================
   Tooltip Styles
   ================================== */

.planemax-tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 4px;
}

.planemax-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--av8-accent-green);
    color: var(--av8-white);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    transition: all 0.2s ease;
}

.planemax-tooltip-icon:hover {
    background: var(--av8-accent-green-dark);
    transform: scale(1.1);
}

.planemax-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: var(--av8-white);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.planemax-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #374151;
}

.planemax-tooltip-container:hover .planemax-tooltip-content {
    visibility: visible;
    opacity: 1;
}

.planemax-tooltip-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

.planemax-tooltip-list li {
    padding-left: 14px;
    position: relative;
}

.planemax-tooltip-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--av8-accent-green);
    font-weight: 700;
}

/* ==================================
   Calculator Section
   ================================== */

.planemax-calculator-section {
    margin: 24px 0;
}

.planemax-slider-container {
    margin-bottom: 24px;
}

.planemax-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.planemax-slider-header label {
    font-size: 18px;
    font-weight: 600;
    color: var(--av8-black);
}

.planemax-scale-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--av8-primary);
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Slider Styles */
.planemax-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.planemax-slider:hover {
    opacity: 1;
}

.planemax-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--av8-primary);
    cursor: pointer;
    border: 2px solid var(--av8-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.planemax-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--av8-primary);
    cursor: pointer;
    border: 2px solid var(--av8-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==================================
   Plan Details
   ================================== */

.planemax-plan-details {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 24px;
}

.planemax-plan-details-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--av8-primary);
    margin: 0 0 8px 0;
}

.planemax-plan-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.planemax-plan-details-list li {
    padding: 4px 0;
    color: #374151;
    font-size: 14px;
}

.planemax-plan-details-list strong {
    color: var(--av8-primary);
    font-size: 18px;
    padding-right: 8px;
}

/* ==================================
   Add-ons Section
   ================================== */

.planemax-addons-section {
    margin-bottom: 24px;
}

.planemax-addons-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--av8-black);
    margin: 0 0 12px 0;
}

.planemax-addons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.planemax-addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.planemax-addon-item:hover {
    background: #f3f4f6;
}

.planemax-addon-name {
    color: #374151;
    font-size: 14px;
}

.planemax-addon-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.planemax-addon-price {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.planemax-addon-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--av8-primary);
}

/* ==================================
   CTA Buttons
   ================================== */

.planemax-cta-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
    font-family: inherit;
}

.planemax-cta-business {
    background: var(--av8-accent-green);
    color: var(--av8-white);
    box-shadow: 0 4px 12px rgba(113, 182, 59, 0.3);
}

.planemax-cta-business:hover {
    background: var(--av8-accent-green-dark);
    box-shadow: 0 6px 16px rgba(113, 182, 59, 0.4);
    transform: translateY(-2px);
}

.planemax-cta-enterprise {
    background: var(--av8-accent-blue);
    color: var(--av8-white);
    box-shadow: 0 4px 12px rgba(0, 174, 255, 0.3);
}

.planemax-cta-enterprise:hover {
    background: #0090d4;
    box-shadow: 0 6px 16px rgba(0, 174, 255, 0.4);
    transform: translateY(-2px);
}

/* ==================================
   Enterprise Plan Specific
   ================================== */

.planemax-enterprise-pricing {
    margin: 24px 0;
}

.planemax-card-enterprise .planemax-price-label {
    color: #bfdbfe;
}

.planemax-card-enterprise .planemax-price-amount {
    color: var(--av8-white);
    font-size: 56px;
}

.planemax-enterprise-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.planemax-enterprise-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    color: #bfdbfe;
    font-size: 14px;
}

.planemax-enterprise-features li::before {
    content: '✓';
    color: var(--av8-accent-blue);
    font-weight: 700;
    flex-shrink: 0;
}

/* ==================================
   Popup Modal
   ================================== */

.planemax-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.planemax-popup.hidden {
    display: none;
}

.planemax-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.planemax-popup-content {
    position: relative;
    background: var(--av8-white);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.planemax-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.2s ease;
}

.planemax-popup-close:hover {
    color: var(--av8-black);
}

.planemax-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--av8-primary);
    margin: 0 0 8px 0;
}

.planemax-popup-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* ==================================
   Contact Form
   ================================== */

.planemax-contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.planemax-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.planemax-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--av8-black);
}

.planemax-form-group .required {
    color: #ef4444;
}

.planemax-form-group input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.planemax-form-group input:focus {
    outline: none;
    border-color: var(--av8-primary);
    box-shadow: 0 0 0 3px rgba(27, 68, 157, 0.1);
}

.planemax-form-message {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
}

.planemax-form-message.hidden {
    display: none;
}

.planemax-form-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.planemax-form-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.planemax-submit-btn {
    padding: 14px 24px;
    background: var(--av8-primary);
    color: var(--av8-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    font-family: inherit;
}

.planemax-submit-btn:hover:not(:disabled) {
    background: var(--av8-primary-dark);
    box-shadow: 0 4px 12px rgba(27, 68, 157, 0.3);
    transform: translateY(-2px);
}

.planemax-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.planemax-submit-loading.hidden {
    display: none;
}

/* ==================================
   Utility Classes
   ================================== */

.hidden {
    display: none !important;
}

/* ==================================
   Responsive Design
   ================================== */

@media (max-width: 768px) {
    .planemax-title {
        font-size: 28px;
    }

    .planemax-subtitle {
        font-size: 16px;
    }

    .planemax-card {
        padding: 24px;
    }

    .planemax-card-title {
        font-size: 24px;
    }

    .planemax-price-amount {
        font-size: 40px;
    }

    .planemax-period-selector {
        gap: 8px;
    }

    .planemax-period-btn {
        padding: 12px 8px;
    }

    .planemax-period-title {
        font-size: 13px;
    }

    .planemax-period-subtitle {
        font-size: 10px;
    }

    .planemax-popup-content {
        padding: 24px;
    }
}

@media (max-width: 576px) {
    .av8-planemax-calculator {
        padding: 12px;
    }

    .planemax-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .planemax-price-amount {
        font-size: 36px;
    }
}
