/**
 * Advanced Pricing Tables Front-End Styles v1.1.0
 */

/* --- Pricing Toggle Switch --- */
.apt-toggle-switch {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.apt-toggle-switch button {
    border: 1px solid #0073e6;
    background-color: #fff;
    color: #0073e6;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.apt-toggle-switch button:first-of-type {
    border-radius: 5px 0 0 5px;
}

.apt-toggle-switch button:last-of-type {
    border-radius: 0 5px 5px 0;
    border-left: none;
}

.apt-toggle-switch button.active {
    background-color: #0073e6;
    color: #fff;
}

/* Main wrapper for the table */
.apt-pricing-table-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 30px 0;
}

/* Individual plan styling */
.apt-plan {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.apt-plan:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Plan Header */
.apt-plan__header {
    padding: 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.apt-plan__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.apt-plan__price {
    font-size: 42px;
    font-weight: 700;
    color: #0073e6;
    margin: 0;
}

.apt-plan__period {
    font-size: 14px;
    color: #777;
}

/* Plan Features */
.apt-plan__features {
    padding: 20px;
    flex-grow: 1;
}

.apt-plan__features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apt-plan__features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.apt-plan__features li:last-child {
    border-bottom: none;
}

/* Plan Footer & Button */
.apt-plan__footer {
    padding: 25px;
}

.apt-plan__button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0073e6;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.apt-plan__button:hover {
    background-color: #005bb7; /* Fallback for default color */
    filter: brightness(90%); /* This darkens any custom color on hover */
}

/* --- Featured Plan Styling & Zoom Effect --- */
.apt-plan--featured {
    border: 2px solid #0073e6;
    position: relative;
    transform: scale(1.1); /* Pronounced zoom */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.apt-plan--featured .apt-plan__header {
    background-color: #0073e6;
}

.apt-plan--featured .apt-plan__title,
.apt-plan--featured .apt-plan__price,
.apt-plan--featured .apt-plan__period {
    color: #fff;
}

.apt-plan--featured:hover {
    transform: scale(1.1); /* Keep zoom on hover */
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
    .apt-pricing-table-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .apt-plan {
        max-width: 400px;
        width: 100%;
    }

    .apt-plan--featured {
        transform: scale(1); /* Reset scaling for stacked view */
    }
}