/* ==============================================
   Subscription Section Styles
   Theme Colors: #5ab7dd (primary cyan), #f4fcff (light bg)
   ============================================== */

/* Container wrapper */
.sub-section-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
}

/* Save badge positioned at top right */
.sub-save-badge {
    position: absolute;
    top: -21px;
    right: 0px;
    background: #32314e;
    color: white;
    padding: 3px 5px;
    border-radius: 4px 4px 0 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Main option boxes */
.sub-option-box {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    padding: 16px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.sub-option-box:hover {
    border-color: #32314e;
    box-shadow: 0 2px 12px rgba(50, 49, 78, 0.15);
}

.sub-option-box.active {
    border-color: #32314e;
    background: #f4fcff;
    box-shadow: 0 4px 16px rgba(50, 49, 78, 0.2);
}

.sub-option-box.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Option header row */
.sub-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Left side with radio and label */
.sub-option-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Custom radio button - matching payment method radio style */
.sub-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #b6b6b6;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    background: #fff;
}

.sub-option-box.active .sub-radio {
    border-color: #32314e;
}

.sub-option-box.active .sub-radio::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #32314e;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Option label text */
.sub-option-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Price display */
.sub-price-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-price-current {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.sub-price-original {
    font-size: 14px;
    color: #000;
    text-decoration: line-through;
}

/* Subscribe option expanded content */
.sub-expanded-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: none;
}

.sub-option-box.active .sub-expanded-content {
    display: block;
}

/* Delivery frequency dropdown */
.sub-frequency-wrapper {
    margin-bottom: 16px;
}

.sub-frequency-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    color: #32314e;
}

.sub-frequency-icon svg {
    width: 100%;
    height: 100%;
}

.sub-frequency-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.sub-frequency-arrow {
    color: #6b7280;
}

/* Benefits list */
.sub-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-benefits-list li {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.sub-benefits-list li:first-child {
    padding-top: 0;
}

.sub-benefit-icon {
    width: 12px;
    height: 12px;
    background: #32314e;
    border-radius: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    margin-top: 5px;
}

.sub-benefit-icon svg {
    width: 10px;
    height: 12px;
    stroke: white;
    stroke-width: 3;
}

/* One-time purchase benefit */
.sub-onetime-benefit {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: none;
}

.sub-option-box.active .sub-onetime-benefit {
    display: block;
}

/* Help message styling */
.sub-help-message {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sub-help-message.info {
    background: #e0f2fe;
    color: #0369a1;
}

.sub-help-message i {
    margin-top: 2px;
}

/* Tooltip for disabled state */
.sub-tooltip-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.sub-tooltip-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    cursor: help;
}

.sub-tooltip-content {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1f2937;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sub-tooltip-wrapper:hover .sub-tooltip-content {
    opacity: 1;
    visibility: visible;
}

.sub-tooltip-content::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1f2937;
}

/* Learn more link */
.sub-learn-more {
    color: #32314e;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.sub-learn-more:hover {
    color: #4b4aa6 !important;
    text-decoration: underline;
}

.sub-border-radius{
    border-radius: 5px 0px 5px 5px !important;
}

/* ======================================
   Responsive Styles
   ====================================== */

/* Mobile */
@media (max-width: 576px) {
    .sub-section-wrapper {
        max-width: 100%;
    }

    .sub-option-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sub-option-left {
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .sub-radio {
        width: 20px;
        height: 20px;
    }

    .sub-option-label {
        font-size: 14px;
        flex-wrap: wrap;
        gap: 6px;
        white-space: nowrap;
    }

    .sub-price-display {
        gap: 6px;
    }

    .sub-price-current {
        font-size: 15px;
    }

    .sub-price-original {
        font-size: 12px;
    }

    .sub-expanded-content {
        margin-top: 12px;
        padding-top: 12px;
    }

    .sub-benefits-list li {
        font-size: 12px;
    }

    .sub-benefit-icon{
        margin-top: 3px;
    }

    .sub-help-message {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Extra small mobile */
@media (max-width: 380px) {

    .sub-price-display {
        margin-left: 32px;
        margin-top: 4px;
    }

    .sub-option-label {
        font-size: 13px;
    }
} */

/* ======================================
   Frequency Select Wrapper Styles
   ====================================== */

.sub-frequency-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px;
}

.sub-frequency-select-wrapper:hover,
.sub-frequency-select-wrapper:focus-within {
    border-color: #5ab7dd;
}

.sub-frequency-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #5ab7dd;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-right: 1px solid #e5e7eb;
}

.sub-frequency-label i {
    font-size: 16px;
}



/* Responsive frequency select */
@media (max-width: 576px) {
    .sub-frequency-select-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .sub-frequency-label {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ======================================
   Disabled state overrides
   ====================================== */

.sub-option-box.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sub-option-box.disabled:hover {
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Override for when clicking disabled */
.sub-option-box.disable_elem {
    opacity: 0.6;
    cursor: not-allowed;
}

.sub-option-box.disable_elem:hover {
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Tooltip positioning - tooltips are siblings before the box, inside position-relative wrapper */
.position-relative > .sub_tooltip {
    position: absolute;
    top: -12px;
    right: -10px;
    z-index: 2000;
}
