/* Health Screening Figma Design - Three Step Process */

.health-screening-container {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.health-screening-title {
    font-family: Inter;
    font-weight: 300;
    font-style: Light;
    font-size: 36px;
    leading-trim: NONE;
    line-height: 48px;
    letter-spacing: -0.75%;
    margin-bottom: 16px;
    color: #1F2937;
}

.health-screening-card {
    background: #FAFDFF;
    border-radius: 16px 16px 0px 0px;
    border: 1px solid #D4DBDF;
    margin-bottom: 0;
}

.health-screening-step {
    margin: 24px;
}


.step-title {
    font-family: Inter;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.333;
    letter-spacing: -0.6%;
    color: #1F2937;
    margin-bottom: 10px;
    margin-top: 0;
}

.step-description {
    font-family: Inter;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.429;
    color: #1F2937;
}

/* Step 1: Tab Component */
.screening-tabs {
    background: #D4DBDF;
    border-radius: 6px;
    padding: 5px;
    display: flex;
    margin-bottom: 8px;
}

.screening-tab {
    flex: 1;
    padding: 6px 12px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.429;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    text-decoration: none;
    color: #4B5563;
}

.screening-tab.active {
    background: #F7F9FA;
    color: #1F2937;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
}

.screening-tab:not(.active) {
    background: transparent;
    color: #4B5563;
}

/* Step 2: Package Selection */
.package-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compare-packages-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #F7F9FA;
    border: 1px solid #D4DBDF;
    border-radius: 6px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.714;
    color: #B45309;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}

/* 手機版和桌面版文字顯示控制 */
.compare-text-desktop {
    display: block;
}

.compare-text-mobile {
    display: none;
}

@media (max-width: 768px) {
    .compare-text-desktop {
        display: none;
    }
    
    .compare-text-mobile {
        display: block;
    }
}

.compare-packages-btn:hover {
    border-color: #B45309;
}

.compare-packages-btn .info-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.package-preview {
    border: 1px solid #D4DBDF;
    border-radius: 4px;
    overflow: visible;
    position: relative;
}

.package-preview-header {
    background: #E6F2FA;
    padding: 0px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-radius: 4px 4px 0 0;
}

/* Package Accordion - Hand Accordion Style */
.package-accordion {
    width: 100%;
    border: 1px solid #D4DBDF;
    border-radius: 8px;
    overflow: hidden;
    background: #FFFFFF;
}

.package-accordion-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    list-style: none;
    min-height: 44px;
    border-radius: 8px;
}

.package-accordion-button:hover {
    background: #F9FAFB;
}

.package-accordion-button.expanded {
    background: #F0F9FF;
    border-bottom: 1px solid #D4DBDF;
    border-radius: 8px 8px 0 0;
}

.package-preview-title {
    font-family: Inter;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.5%;
    color: #1F2937;
}

.package-accordion-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: #1F2937;
}

/* Rotate chevron when accordion is expanded */
.package-accordion-button.expanded .package-accordion-icon {
    transform: rotate(180deg);
}

/* Accordion Content - Default Expanded */
.package-accordion-content {
    background: #FFFFFF;
    border-top: 1px solid #F3F4F6;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 500px;
    opacity: 1;
}

.package-accordion-content:not(.expanded) {
    max-height: 0;
    opacity: 0;
}

.package-accordion-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: transparent;
    text-align: left;
    font-family: Inter;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #1F2937;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #F3F4F6;
}

.package-accordion-option:last-child {
    border-bottom: none;
}

.package-accordion-option:hover {
    background: #F9FAFB;
}

.package-accordion-option.selected {
    background: #E6F2FA;
    font-weight: 500;
}

/* Package dropdown option name, addons, and price styles */
.package-option-name {
    flex: 1;
    text-align: left;
}

.package-option-addons {
    font-size: 14px;
    color: #6B7280;
    text-align: center;
    margin: 0 16px;
    white-space: nowrap;
}

.package-option-price {
    font-weight: 500;
    color: #059669;
    text-align: right;
    white-space: nowrap;
}

.package-card-content {
    background: #F3F4F6;
    padding: 24px 16px;
    border: 1px solid transparent;
    border-radius:8px;
}

/* Hide package content container when no package is selected */
.package-content-container:empty,
.package-content-container[style*="display: none"] {
    display: none !important;
}

/* Only show package card content when package is actually selected */
.package-content-container.package-selected .package-card-content {
    background: #F3F4F6;
}

/* Hide package card content when no package is selected */
.package-content-container:not(.package-selected) .package-card-content {
    background: transparent;
}

.package-duration {
    font-family: Inter;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #6B7280;
    margin-bottom: 8px;
}

.package-name {
    font-family: Inter;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.333;
    letter-spacing: -0.6%;
    color: #1F2937;
    margin-bottom: 8px;
}

.package-price {
    font-family: Inter;
    font-size: 48px;
    font-weight: 300;
    line-height: 1.333;
    letter-spacing: -1.2%;
    color: #1F2937;
}

.package-savings {
    font-family: Inter;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.667;
    color: #005250;
    opacity: 0.8;
    margin-bottom: 16px;
}

.package-description {
    font-family: Inter;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.429;
    color: #4B5563;
    margin: 0;
}

/* Step 3: Add-ons - Book Page Style */
.addons-section {
    text-align: center;
}

.addons-title {
    color: #B45309 !important;
    font-family: Inter;
    font-weight: 400;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.5%;
    text-align: center;
    margin-top: 16px;
    margin-bottom: 16px;
}

.addons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    /* justify-content: center; */
}

.addon-item {
    gap: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    background-color: #E8ECEE;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addon-item.selected {
    background-color: #FDE68A;
    color: #1F2937;
}

.addon-icon {
    width: 24px;
    height: 24px;
    margin: 8px;
    flex-shrink: 0;
}

.addon-content {
    flex: 1;
    margin: 0px;
    margin-right: 16px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: #001621;
}

.addon-item:not(.selected) .addon-content {
    color: #4B5563;
}

.addon-price {
    margin-left: 8px;
    font-weight: 500;
}

.addon-button {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    margin: 12px !important;
    border: none !important;
    background: transparent !important;
    transition: all 0.3s ease;
}

.addon-button:hover {
    transform: scale(1.1);
}

.addon-button-icon {
    width: 16px;
    height: 16px;
}

/* Action Section */
.action-section {
    background: #FAFDFF;
    border: 1px solid #D4DBDF;
    border-top: none;
    border-radius: 0px 0px 16px 16px;
    padding: 16px 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.view-provider-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 16px;
    background: #135370;
    border: none;
    border-radius: 6px;
    font-family: Inter;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.714;
    color: #E6F2FA;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-provider-btn:hover {
    background: #0F4C63;
}

.view-provider-btn .arrow-icon {
    width: 16px;
    height: 16px;
}

/* Total Price section styles */
.total-price-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.total-price-label {
    font-family: Inter;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

.total-price-amount {
    font-family: Inter;
    font-size: 20px;
    font-weight: 600;
    color: #135370;
}

/* View Provider 按鈕 disabled 狀態樣式 */
.view-provider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #E5E7EB;
    color: #9CA3AF;
    border-color: #D1D5DB;
}

.view-provider-btn:disabled:hover {
    background-color: #E5E7EB;
    border-color: #D1D5DB;
    transform: none;
}

/* Responsive Design */
@media (min-width: 768px) {

    .health-screening-title {
        font-size: 48px;
    }
}

@media (max-width: 767px) {

    .health-screening-step {
        margin:  24px 16px;
    }

    .action-section {
        padding: 16px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .total-price-section {
        justify-content: center;
        margin-right: 0;
    }
    
    .view-provider-btn {
        justify-content: center;
    }

    .package-card-content {
        padding: 16px;
    }

    .health-screening-title {
        font-size: 28px;
        line-height: 1.2;
        padding: 16px;
        padding-bottom: 0px;
        display: none;  
    }
    .health-screening-card,.action-section {
        background: unset;
        border-radius: 0px !important;
        border: unset;
    }

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

    .package-price {
        font-size: 36px;
    }

    /* Stack addon content vertically on mobile if needed */
    .addon-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

}

/* Ensure proper hover states for touch devices */
@media (hover: hover) {
    .screening-tab:hover {
        background: rgba(247, 249, 250, 0.7);
    }

    .addon-button:hover {
        transform: scale(1.05);
    }
}

/* Fix for x-show transitions */
[x-cloak] {
    display: none !important;
}

/* Mobile specific adjustments for dropdown and addons */
@media (max-width: 767px) {

    .package-dropdown-menu {
        max-height: 240px;
        overflow-y: auto;
    }

    .package-dropdown-option {
        padding: 16px;
        font-size: 14px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .package-option-addons {
        font-size: 12px;
        margin: 0 8px;
    }

    .package-preview-title {
        font-size: 18px;
    }

    /* Make compare button full-width for easy tapping */
    .compare-packages-btn {
        justify-content: center;
        gap: 8px;
    }

    /* Reduce plan card padding a bit on small screens */
    .package-card-content {
        padding: 16px;
    }

    .step-description {
        margin-bottom: 16px;
    }

    .addons-title {
        font-size: 18px;
        line-height: 24px;
    }

    /* Mobile layout: put total price on its own line and make button full-width */
    .action-section {
        flex-wrap: wrap;
        padding: 16px;
    }

    .total-price-section {
        flex: 1 1 100%;
        margin-bottom: 12px;
    }

}

.total-price-section {
    display: flex;
    align-items: center;
}

.total-price-label {
    font-family: Inter;
    font-size: 18px;
    font-weight: 500;
    color: #1F2937;
    min-width: 100px;
}

.total-price-amount {
    font-family: Inter;
    font-size: 18px;
    font-weight: 600;
    color: #135370;
    text-align: left;
    flex: 1;
}

/* Removed auto-expand styles - now using on-demand expansion */

/* Removed first visit hint styles - now using accordion auto-expand */

/* Package Content Container - No Animation */
.package-content-container {
    /* Removed animation effects to prevent bouncing */
    /* opacity: 0; */
    /* transform: translateY(20px); */
    /* transition: all 0.3s ease; */
}

.package-content-container.show {
    /* opacity: 1; */
    /* transform: translateY(0); */
}

/* Smooth transition for package content appearance */
.package-content-container[style*="display: block"] {
    /* opacity: 1; */
    /* transform: translateY(0); */
}

/* Stable accordion state - prevent unwanted animations */
.package-accordion[data-auto-expanded="true"] .package-accordion-button {
    transition: none !important;
    transform: none !important;
}

.package-accordion[data-auto-expanded="true"] .package-accordion-content {
    transition: none !important;
}

.p-0{
    padding: 0px !important;
}

.step-separator{
    margin: 24px;
}