/* FX Warrant page — Tailwind handles layout/typography; keep stateful & complex rules here */

#fx_warrant {
    --fx-banner-height: 250px;
    --fx-header-offset: 132px;
    --fx-scroll-offset: 196px;
    --fx-chevron-icon: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 8L12 16L5 8' stroke='%231A7B99' stroke-width='1.5' stroke-linejoin='round' /%3E%3C/svg%3E");
}

#fx_warrant .fx_warrant_tab_panel {
    scroll-margin-top: var(--fx-scroll-offset);
}

/* ─── Hero banner (transitions & bg image) ─── */
#fx_warrant .fx_warrant_banner_slider,
#fx_warrant .fx_warrant_banner_panels,
#fx_warrant .fx_warrant_banner_slide,
#fx_warrant .fx_warrant_banner_slide_container,
#fx_warrant .fx_warrant_banner_inner {
    height: var(--fx-banner-height);
}

#fx_warrant .fx_warrant_banner_panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    z-index: 0;
}

#fx_warrant .fx_warrant_banner_panel.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* #fx_warrant .fx_warrant_banner_visual {
    background-image: url(../images/img_fx_hub.png);
} */

#fx_warrant .fx_warrant_banner_copy_panel {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

#fx_warrant .fx_warrant_banner_copy_panel.active {
    opacity: 1;
    visibility: visible;
}

#fx_warrant .fx_warrant_banner_copy_panel:not(.active) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

#fx_warrant .banner_dot {
    transition: width 0.25s ease, background-color 0.25s ease;
}

#fx_warrant .banner_dot.active {
    width: 14px;
    background-color: #1A7B99;
}

#fx_warrant .banner_dot:hover {
    background-color: #1A7B99;
    opacity: 0.85;
}

/* ─── Anchor tab bar (sticky & active states) ─── */
#fx_warrant .fx_warrant_anchor_tab {
    transition: background-color 0.2s ease, color 0.2s ease;
}

#fx_warrant .fx_warrant_anchor_tab:last-child {
    border-right: none;
}

#fx_warrant .fx_warrant_anchor_tab:hover:not(.active) {
    background-color: #F5F7F8;
}

#fx_warrant .fx_warrant_anchor_tab.active {
    background-color: #1A7B99;
    color: #FFFFFF;
}

@media (max-width: 1023px) {
    #fx_warrant .fx_warrant_anchor_tab.active {
        color: #31373D !important;
    }

    #fx_warrant .fx_warrant_anchor_tab.active .fx_anchor_tab_icon,
    #fx_warrant .fx_warrant_anchor_tab .fx_anchor_tab_icon {
        filter: brightness(0) invert(0) !important;
    }
}

#fx_warrant .fx_anchor_tab_icon_coin {
    background-image: url(../images/icon_anchor_coin.svg);
}

#fx_warrant .fx_anchor_tab_icon_scales {
    background-image: url(../images/icon_anchor_scales.svg);
}

#fx_warrant .fx_anchor_tab_icon_globaltime {
    background-image: url(../images/icon_anchor_globaltime.svg);
}

#fx_warrant .fx_anchor_tab_icon_news {
    background-image: url(../images/icon_anchor_news.svg);
}

#fx_warrant .fx_anchor_tab_icon_education {
    background-image: url(../images/icon_anchor_education.svg);
}

#fx_warrant .fx_warrant_anchor_tab.active .fx_anchor_tab_icon {
    filter: brightness(0) invert(1);
}

/* ─── Tab 1: warrant tags (jphk call/put icons) ─── */
#fx_warrant .fx_trend_warrant_tag .icon {
    width: 24px;
    height: 24px;
    background-size: 18px 18px;
}

/* ─── Tab 3: calendar grid & scrollbar ─── */
#fx_warrant .fx_schedule_calendar_weekdays,
#fx_warrant .fx_schedule_calendar_grid {
    --fx_schedule_col: calc(100% / 7);
    display: grid;
    grid-template-columns: repeat(6, var(--fx_schedule_col)) calc(100% - var(--fx_schedule_col) * 6);
    width: 100%;
}

#fx_warrant .fx_schedule_calendar_grid>.fx_schedule_day:nth-last-child(-n+7) {
    border-bottom: none;
}

#fx_warrant .fx_schedule_calendar_grid>.fx_schedule_day:nth-last-child(7) {
    border-bottom-left-radius: 8px;
}

#fx_warrant .fx_schedule_calendar_grid>.fx_schedule_day:last-child {
    border-bottom-right-radius: 8px;
}

#fx_warrant .fx_schedule_day.is-selected {
    background-color: #E2E4E5;
}

#fx_warrant .fx_schedule_day_mark--data {
    background-color: #C9A86A;
}

#fx_warrant .fx_schedule_day_mark--bank {
    background-color: #8B6EAD;
}

#fx_warrant .fx_schedule_legend_line--data {
    background-color: #C9A86A;
}

#fx_warrant .fx_schedule_legend_line--bank {
    background-color: #8B6EAD;
}

#fx_warrant .fx_schedule_events_list {
    scrollbar-width: thin;
    scrollbar-color: #2B9AB3 #F5F7F8;
}

#fx_warrant .fx_schedule_events_list::-webkit-scrollbar {
    width: 4px;
}

#fx_warrant .fx_schedule_events_list::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

#fx_warrant .fx_schedule_events_list::-webkit-scrollbar-track {
    margin: 8px 0;
    background: #F5F7F8;
    border-radius: 2px;
}

#fx_warrant .fx_schedule_events_list::-webkit-scrollbar-thumb {
    background-color: #2B9AB3;
    border: none;
    border-radius: 2px;
}

#fx_warrant .fx_schedule_events_list::-webkit-scrollbar-corner {
    background: transparent;
}

#fx_warrant .fx_schedule_event_icon--earnings {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #C9A86A;
    place-self: center;
}

#fx_warrant .fx_schedule_event_icon--jpy {
    background-image: url(../images/flag_JPY.svg);
}

#fx_warrant .fx_schedule_event_icon--aud {
    background-image: url(../images/flag_AUD.svg);
}

#fx_warrant .fx_schedule_event_icon--gbp {
    background-image: url(../images/flag_GBP.svg);
}

#fx_warrant .fx_schedule_event_icon--usd {
    background-image: url(../images/flag_USD.svg);
}

#fx_warrant .fx_schedule_event_icon--cnh {
    background-image: url(../images/flag_CNH.svg);
}

#fx_warrant .fx_schedule_event_icon--nzd {
    background-image: url(../images/flag_NZD.svg);
}

#fx_warrant .fx_schedule_event_icon--eur {
    background-image: url(../images/flag_EUR.svg);
}

#fx_warrant .fx_schedule_event_icon--cad {
    background-image: url(../images/flag_CAD.svg);
}

#fx_warrant .fx_schedule_month_arrow--prev {
    transform: rotate(180deg);
}

/* Calendar cells & events (JS-rendered / complex grid) */
#fx_warrant .fx_schedule_calendar_weekdays {
    align-items: center;
    height: 46px;
    background-color: #FAF8F2;
    border-radius: 8px 8px 0 0;
}

#fx_warrant .fx_schedule_weekday {
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    color: #83878B;
}

#fx_warrant .fx_schedule_day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    height: 84px;
    padding: 22px 0;
    border: none;
    border-bottom: 1px solid #DFDFE0;
    background-color: #FFFFFF;
    cursor: pointer;
}

#fx_warrant .fx_schedule_day--empty {
    pointer-events: none;
}

#fx_warrant .fx_schedule_day_num {
    height: 24px;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
    color: #31373D;
}

#fx_warrant .fx_schedule_day_marks {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    max-width: 20px;
    height: 12px;
}

#fx_warrant .fx_schedule_day_mark {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
}

#fx_warrant .fx_schedule_event {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px 12px;
    align-items: start;
    padding: 20px;
    border-bottom: 1px solid #EFEFF0;
}

@media (max-width: 767px) {
    #fx_warrant .fx_schedule_day_num {
        font-size: 18px;
    }

    #fx_warrant .fx_schedule_event {
        padding: 16px;
    }
}

#fx_warrant .fx_schedule_event:last-child {
    border-bottom: none;
}

#fx_warrant .fx_schedule_event_time {
    grid-column: 1 / -1;
    font-size: 18px;
    line-height: 1.4;
    color: #5A5F64;
    white-space: nowrap;
}

#fx_warrant .fx_schedule_event_title {
    grid-column: 2;
    align-self: center;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #31373D;
}

@media (max-width: 767px) {

    #fx_warrant .fx_schedule_event_time,
    #fx_warrant .fx_schedule_event_title {
        font-size: 16px;
    }

}

#fx_warrant .fx_schedule_event_icon {
    grid-column: 1;
    align-self: center;
    width: 24px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* ─── Tab 4: news accordion ─── */
#fx_warrant .fx_news_chevron,
#fx_warrant .fx_education_concept_chevron {
    background-image: var(--fx-chevron-icon);
    transition: transform 0.2s ease;
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
}

#fx_warrant .fx_news_card:not(.is-open) .fx_news_title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#fx_warrant .fx_news_card.is-open .fx_news_chevron {
    transform: rotate(180deg);
}

#fx_warrant .fx_news_panel {
    display: none;
}

#fx_warrant .fx_news_card.is-open .fx_news_panel {
    display: block;
}

/* ─── Tab 5: education accordion ─── */
#fx_warrant .fx_education_concept_item.is-open .fx_education_concept_trigger {
    padding-bottom: 12px;
}

#fx_warrant .fx_education_concept_item.is-open .fx_education_concept_chevron {
    transform: rotate(180deg);
}

#fx_warrant .fx_education_concept_panel {
    display: none;
}

#fx_warrant .fx_education_concept_item.is-open .fx_education_concept_panel {
    display: block;
}

#fx_warrant .fx_education_topic_link {
    transition: color 0.2s ease;
}

#fx_warrant .fx_education_topic_link:hover {
    color: #1A7B99;
}

/* anchor nav 凍結 */
.fx_warrant_anchor_area.is-scrolled {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 7;
}


/* result_announcements */

#result_announcements .result_schedule_calendar_weekdays {
    align-items: center;
    height: 46px;
    background-color: #FAF8F2;
    border-radius: 8px 8px 0 0;
}

#result_announcements .result_schedule_weekday {
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    color: #83878B;
}

#result_announcements .result_schedule_calendar_weekdays,
#result_announcements .result_schedule_calendar_grid {
    --fx_schedule_col: calc(100% / 7);
    display: grid;
    grid-template-columns: repeat(6, var(--fx_schedule_col)) calc(100% - var(--fx_schedule_col) * 6);
    width: 100%;
}

#result_announcements .result_schedule_day_num {
    height: 24px;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
    color: #31373D;
}

#result_announcements .result_schedule_day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    height: 84px;
    padding: 22px 0;
    border: none;
    border-bottom: 1px solid #DFDFE0;
    background-color: #FFFFFF;
    cursor: pointer;
}

#result_announcements .result_schedule_day_marks {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    max-width: 20px;
    height: 12px;
}

#result_announcements .result_schedule_day_mark {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
}

#result_announcements .result_schedule_day_mark--data {
    background-color: #C9A86A;
}

#result_announcements .result_schedule_day.is-selected {
    background-color: #E2E4E5;
}

#result_announcements .result_schedule_legend_line--data {
    background-color: #C9A86A;
}


#result_announcements .result_schedule_event {
    padding: 20px;
    border-bottom: 1px solid #EFEFF0;
}

#result_announcements .result_schedule_event:first-child {
    padding-top: 0;
}

#result_announcements .result_schedule_event_time {
    grid-column: 1 / -1;
    font-size: 18px;
    line-height: 1.4;
    color: #5A5F64;
    white-space: nowrap;
}

#result_announcements .result_schedule_event_title {
    grid-column: 2;
    align-self: center;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #31373D;
}

@media (max-width: 767px) {

    #result_announcements .result_schedule_day_num {
        font-size: 18px;
    }

    #result_announcements .result_schedule_event_title {
        font-size: 16px;
    }

    #result_announcements .result_schedule_event {
        padding: 16px;
    }

    #fx_warrant .fx_warrant_banner_area {
        padding: 24px 0;
    }

    #fx_warrant .fx_warrant_banner_slider {
        height: auto;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    #fx_warrant .fx_warrant_banner_panels {
        height: auto;
        position: relative;
        order: 2;
    }

    #fx_warrant .fx_warrant_banner_panel {
        position: absolute;
        inset: 0;
        opacity: 0;
        visibility: hidden;
        height: auto;
        transition: opacity 0.45s ease, visibility 0.45s ease;
    }

    #fx_warrant .fx_warrant_banner_panel.active {
        position: relative;
        opacity: 1;
        visibility: visible;
    }

    #fx_warrant .fx_warrant_banner_slide,
    #fx_warrant .fx_warrant_banner_slide_container {
        height: auto;
        position: relative;
    }

    #fx_warrant .fx_warrant_banner_visual {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        top: auto;
        right: auto;
    }

    #fx_warrant .fx_warrant_banner_inner {
        position: relative;
        height: auto;
        order: 1;
        padding: 0 16px;
    }

    #fx_warrant .banner_content_group {
        max-width: 100%;
        height: auto;
    }

    #fx_warrant .fx_warrant_banner_copy_stack {
        position: relative;
        width: 100%;
    }

    #fx_warrant .fx_warrant_banner_copy_panel {
        position: absolute;
        inset: 0;
        opacity: 0;
        visibility: hidden;
        height: auto;
    }

    #fx_warrant .fx_warrant_banner_copy_panel.active {
        position: relative;
        opacity: 1;
        visibility: visible;
    }
}

/* ─── Mobile expand toggle for FX chart ─── */
#fx_warrant .mobile-expand-toggle {
    display: none !important;
}

#fx_warrant .mobile-expand-toggle:after,
#fx_warrant .mobile-expand-toggle:before {
    content: "";
    position: absolute;
    width: 50%;
    height: 1px;
    display: block;
    top: 20px;
    background: #dfdfe0;
    z-index: 0;
}

#fx_warrant .mobile-expand-toggle:after {
    right: 0;
}

#fx_warrant .mobile-expand-toggle:before {
    left: 0;
}

@media (max-width: 767px) {
    #fx_warrant .mobile-expand-toggle {
        display: flex !important;
    }

    #fx_warrant .chart_expand {
        display: none !important;
    }

    #fx_warrant article.is-expanded .chart_expand {
        display: flex !important;
    }
}