/* MAIN WRAPPER */
.uffizio-product-plan-widget {
    background: #fff;
    border-radius: 16px;
    padding: 20px 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.uffizio-product-plan-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* HEADER */
.plan-header {
    margin-bottom: 24px;
}

.plan-icon {
    font-size: 24px;
    color: var(--uffizio-color-accent);
    margin-bottom: 16px;
    display: flex;
    gap: 4px;
}

.plan-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #75b7fd 0%, rgba(0, 123, 255, 0) 100%);
    margin-bottom: 20px;
}

.plan-description {
    font-size: 16px;
    color: var(--uffizio-text-secondary);
    line-height: 1.5;
}

/* TOGGLE BUTTON */
.plan-toggle-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.plan-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--uffizio-color-accent);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 130%;
}

.plan-toggle-btn:hover {
    color: var(--uffizio-color-accent);
}

.plan-toggle-btn::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 10px;
    margin-bottom: 3px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plan-toggle-btn.active::after {
    transform: rotate(-135deg);
    margin-bottom: -1px;
}



/* FEATURES LIST */
.plan-features-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uffizio-product-plan-widget .uffizio-list-icon {
    position: relative;
    padding-left: 35px !important;
    /* Extra space between icon and text */
    display: flex !important;
    align-items: flex-start;
}



/* Smooth expansion for hidden items */
.uffizio-list-icon.hidden-item {
    display: flex !important;
    /* Keep as flex for layout */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 35px !important;
    /* Keep icon space while hidden to prevent jumping */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        margin 0.4s ease,
        padding 0.4s ease;
}

.plan-features-list.expanded .uffizio-list-icon.hidden-item {
    max-height: 500px;
    /* Increased for long text */
    opacity: 1;
    margin-bottom: 12px !important;
    padding-top: 4px !important;
    padding-left: 35px !important;
    overflow: visible !important;
    /* Allow tooltips to show */
}



.plan-features-list.has-toggle {
    transition: margin-bottom 0.4s ease;
}

.plan-features-list.has-toggle.expanded {
    margin-bottom: 20px;
}


/* Feature content text container */
.feature-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.feature-text {
    font-size: 15px;
    color: var(--uffizio-text-secondary);
    line-height: 130%;
    font-weight: 400;
}

/* TOOLTIP */
.feature-tooltip-wrapper {
    position: relative;
    margin-left: 12px;
    cursor: help;
}

/* Tooltip Icon */
.tooltip-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
}

/* Circle */
.tooltip-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px solid #484848;
    border-radius: 50%;
}

/* Centered "!" */
.tooltip-icon::after {
    content: "!";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--uffizio-text-secondary);
    line-height: 1;
}

/* Hover */
.tooltip-icon:hover::before {
    border-color: #333;
}

.tooltip-icon:hover::after {
    color: #333;
}

/* Tooltip Bubble */
.tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    right: -10px;
    width: 220px;
    background-color: #1a1a1a;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    z-index: 10;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

/* Tooltip Arrow */
.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 14px;
    border-width: 6px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

/* Show Tooltip */
.feature-tooltip-wrapper:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
/* RESPONSIVE BREAKPOINTS */

/* Large Desktop / Laptop */
@media (max-width: 1365px) {
    .uffizio-product-plan-widget {
        padding: 28px;
    }

    .plan-title {
        font-size: 26px;
    }

    .plan-icon {
        font-size: 22px;
        margin-bottom: 14px;
    }

    .plan-description {
        font-size: 15px;
    }

    .plan-toggle-btn {
        font-size: 15px;
    }

    .feature-text {
        font-size: 14px;
    }

    .tooltip-content {
        width: 200px;
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .uffizio-product-plan-widget {
        padding: 24px;
    }

    .plan-title {
        font-size: 24px;
    }

    .plan-icon {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .plan-description {
        font-size: 14px;
    }

    .plan-toggle-btn {
        font-size: 14px;
    }

    .feature-text {
        font-size: 13px;
    }

    .tooltip-content {
        width: 180px;
        right: -5px;
    }
}

/* Small Tablets / Large Phones */
@media (max-width: 767px) {
    .uffizio-product-plan-widget {
        padding: 20px;
    }

    .plan-title {
        font-size: 22px;
    }

    .plan-icon {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .plan-description {
        font-size: 13px;
    }

    .plan-toggle-btn {
        font-size: 13px;
    }

    .feature-text {
        font-size: 12px;
    }

    .tooltip-content {
        width: 160px;
        right: -5px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .uffizio-product-plan-widget {
        padding: 16px;
    }

    .plan-title {
        font-size: 20px;
    }

    .plan-icon {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .plan-description {
        font-size: 14px;
    }

    .plan-toggle-btn {
        font-size: 14px;
    }

    .feature-text {
        font-size: 14px;
    }

    .tooltip-content {
        width: 140px;
        right: -3px;
    }
}