/**
 * Pricing Tiers Frontend Widget Styles
 *
 * These styles are identical to the customer portal billing page
 * to ensure consistent display across the site
 */

/* Widget Container */
.cas-pricing-widget {
    max-width: 1200px;
    margin: 0 auto;
}

.cas-pricing-widget-header {
    margin-bottom: 24px;
}

.cas-pricing-widget-title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.cas-pricing-widget-tagline {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Pricing Tiers Display */
.cas-pricing-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cas-tier-item {
    flex: 1;
    min-width: 160px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.cas-tier-item:last-child {
    border-right: none;
}

.cas-tier-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: none;
}

/* Highlighted tier (for "Recommended" or "Current" tier) */
.cas-tier-item.cas-tier-highlighted {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-right-color: rgba(0, 123, 255, 0.2);
    box-shadow: inset 0 0 0 2px #007bff;
    margin: -1px;
    padding: 25px 17px;
    border-radius: 12px;
    z-index: 1;
}

/* Current tier (green version for customer portal) */
.cas-tier-item.cas-tier-current {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-right-color: rgba(40, 167, 69, 0.2);
    box-shadow: inset 0 0 0 2px #28a745;
    margin: -1px;
    padding: 25px 17px;
    border-radius: 12px;
    z-index: 1;
}

.cas-tier-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.cas-tier-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cas-tier-subtitle {
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
    font-style: italic;
}

.cas-tier-range {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.cas-tier-item.cas-tier-highlighted .cas-tier-range {
    background: rgba(255, 255, 255, 0.8);
    color: #0d47a1;
}

.cas-tier-item.cas-tier-current .cas-tier-range {
    background: rgba(255, 255, 255, 0.8);
    color: #155724;
}

.cas-tier-price {
    margin-bottom: 4px;
}

.cas-tier-amount {
    font-size: 26px;
    font-weight: 800;
    color: #2c3e50;
    display: block;
}

.cas-tier-item.cas-tier-highlighted .cas-tier-amount {
    color: #0d47a1;
}

.cas-tier-item.cas-tier-current .cas-tier-amount {
    color: #155724;
}

.cas-tier-period {
    font-size: 11px;
    color: #888;
    display: block;
}

.cas-tier-discount {
    font-size: 11px;
    color: #28a745;
    font-weight: 600;
    margin-top: 6px;
}

.cas-tier-badge-current {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.cas-tier-item.cas-tier-current .cas-tier-badge-current {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .cas-pricing-tiers {
        flex-wrap: wrap;
    }

    .cas-tier-item {
        min-width: 140px;
        flex: 1 1 calc(33.333% - 1px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .cas-tier-item:nth-child(3) {
        border-right: none;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .cas-pricing-widget-title {
        font-size: 24px;
    }

    .cas-pricing-tiers {
        flex-direction: column;
        border-radius: 12px;
    }

    .cas-tier-item {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding: 20px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .cas-tier-item:last-child {
        border-bottom: none;
    }

    .cas-tier-item.cas-tier-highlighted,
    .cas-tier-item.cas-tier-current {
        margin: 0;
        padding: 20px;
        border-radius: 0;
    }

    .cas-tier-icon {
        font-size: 24px;
        margin-bottom: 0;
        margin-right: 12px;
        order: 1;
    }

    .cas-tier-name {
        order: 2;
        flex: 1;
        margin-bottom: 0;
    }

    .cas-tier-subtitle {
        display: none;
    }

    .cas-tier-range {
        order: 3;
        margin-bottom: 0;
        margin-left: auto;
    }

    .cas-tier-price {
        order: 4;
        margin-bottom: 0;
        margin-left: 16px;
        text-align: right;
    }

    .cas-tier-amount {
        font-size: 20px;
    }

    .cas-tier-discount {
        order: 5;
        margin-left: 8px;
        margin-top: 0;
    }

    .cas-tier-badge-current {
        top: auto;
        bottom: 8px;
        right: 8px;
    }
}

/* Additional Elementor Integration Styles */
.elementor-widget-cas_pricing_tiers {
    width: 100%;
}

.elementor-widget-cas_pricing_tiers .cas-pricing-widget {
    width: 100%;
}
