/* 
 * Tabs Widget Styles 
 * Using REM units for typography and responsive design
 */


/* ------------ Base widget styles ------------ */

.tabs-widget {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 1.5rem rgba(0, 0, 0, 0.05);
}


/* ------------ Tabs header section ------------ */

.tabs-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background-color: #fff;
    position: relative;
    z-index: 2;
}

.tabs-title {
    position: relative;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0B2545;
}

.tabs-title:after {
    content: "";
    width: 2.5rem;
    height: 0.25rem;
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    background-color: #00ADEE;
}


/* Tab items styling */

.tabs {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 0 0;
    width: 100%;
}

.tab-item {
    margin-bottom: 1rem;
}

.tab {
    padding: 0.75rem 0;
    cursor: pointer;
    font-weight: 600;
    color: #0B2545;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    outline: none;
}

.tab:hover {
    color: #00ADEE;
}

.tab:focus-visible {
    outline: 2px dashed #00ADEE;
    outline-offset: 0.25rem;
}

.tab-icon {
    display: flex;
    margin-left: 0.5rem;
    color: #00ADEE;
}

.tab[aria-selected="true"] {
    color: #00ADEE;
}

.tab svg,
.tab i {
    width: 1rem;
    fill: currentColor;
    color: currentColor;
}


/* Tab content base styles */

.tab-content {
    background-color: #0B2545;
    color: #fff;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 3rem;
    display: none;
    text-align: center;
    max-width: 36rem;
    /* Limit width for readability */
    margin: 0 auto;
}

.tab-content[aria-hidden="false"] {
    display: block;
}

.content-title {
    color: #fff !important;
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    font-weight: 600;
    text-align: left !important;
}

.content-text {
    margin-bottom: unset;
    text-align: left !important;
}

.tab-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 1rem;
}


/* Button styling */

.content-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: white;
    border: 1px solid #F6FDFF;
    border-radius: 2rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
    min-width: 8rem;
    /* Minimum width for very short text */
    max-width: fit-content;
    /* Allow button to fit its content */
    width: auto;
    /* Width based on content */
    margin-right: auto;
    /* Align to the left to match text */
}

.content-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-0.125rem);
}

.content-button:focus-visible {
    outline: 2px solid #00ADEE;
    outline-offset: 0.25rem;
}

.button-icon {
    display: inline-flex;
    margin-left: 0.5rem;
}

.button-icon svg {
    width: 1rem;
    height: 1rem;
    fill: white;
}


/* ------------ Desktop Styles ------------ */

@media screen and (min-width: 64.0625rem) {
    /* Above 1025px */
    .tabs-widget {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
    }
    .tabs-header {
        width: 50%;
        padding: 2rem;
        background-color: #fff;
        flex: 0 0 50%;
    }
    /* Tab styles for desktop - remove hover on desktop to match screenshot */
    .tab {
        padding: 0.75rem 0;
        font-size: 1rem;
    }
    .tab:hover {
        color: inherit;
        /* Don't change color on hover for tabs that aren't active */
    }
    .tab[aria-selected="true"]:hover {
        color: #00ADEE;
        /* Allow hover color to remain for active tab */
    }
    .tab-icon {
        color: #00ADEE;
        /* Arrow color for desktop view */
    }
    /* Tab content styling for desktop - 50% width blue background on right */
    .tab-content {
        width: 50%;
        flex: 0 0 50%;
        padding: 3rem;
        background-color: #0B2545;
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        display: none;
        text-align: center;
        opacity: 0;
    }
    /* Show active tab content */
    .tab-content[aria-hidden="false"] {
        display: flex;
        flex-direction: column;
        justify-content: center;
        opacity: 1;
    }
    /* Content styling to match screenshot */
    .content-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        display: block !important;
    }
    .tab-content p {
        /* font-size: 0.95rem; */
        line-height: 1.5;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    /* Button styling to match screenshot */
    .content-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
        margin-top: 1rem;
        min-width: 7rem;
        /* Minimum width for desktop */
        max-width: fit-content;
        /* Adjust to content */
        width: auto;
    }
}


/* ------------ Mobile Accordion Styles ------------ */

@media screen and (max-width: 64rem) {
    /* 1024px and below */
    .tabs-widget {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
        background-color: #0B2545;
    }
    .tabs-header {
        width: 100%;
        padding: 1.5rem;
        background-color: #0B2545;
    }
    .tabs-title {
        color: #fff !important;
        font-size: 1.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    /* Remove the underline from the title to match the screenshot */
    .tabs-title:after {
        display: none;
    }
    .tabs {
        margin-top: 1rem;
    }
    /* Tab item container */
    .tab-item {
        margin-bottom: 0;
    }
    /* Tab header */
    .tab {
        color: #fff;
        padding: 0.75rem 0;
        margin-bottom: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .tab-item:first-child .tab {
        border-top: none;
    }
    .tab:hover {
        color: #fff;
    }
    .tab[aria-selected="true"] {
        color: #00ADEE;
    }
    .tab svg,
    .tab i {
        color: #fff;
        fill: #fff;
        transition: transform 0.3s ease;
    }
    .tab[aria-selected="true"] svg,
    .tab[aria-selected="true"] i {
        color: #00ADEE;
        fill: #00ADEE;
        transform: rotate(90deg);
    }
    /* Tab content - right after its tab header */
    .tab-content {
        padding: 0.75rem 0 1.5rem 0;
        background-color: transparent;
        display: none;
        text-align: left;
    }
    .tab-content[aria-hidden="false"] {
        display: block;
    }
    .content-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        margin-top: 0.5rem;
        text-align: left;
    }
    .tab-content p {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    .content-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
        font-weight: 400;
        min-width: 6rem;
        /* Minimum width for mobile */
        max-width: fit-content;
        /* Adjust to content */
        width: auto;
    }
}


/* Small mobile devices, additional refinements */

@media screen and (max-width: 30rem) {
    /* 480px */
    .tabs-header {
        padding: 1rem;
    }
    .tabs-title {
        font-size: 1.25rem;
    }
    .tab-content {
        padding: 1rem;
    }
    .content-title {
        font-size: 1.125rem;
    }
    .tab-content p {
        font-size: 0.875rem;
    }
}