/* Match the existing Contact tab, with a 10px gap above it. */
#request-quote-tab {
    position: fixed;
    right: 0;
    bottom: 235px;
    width: 50px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #aa8436;
    color: #fff;
    border-radius: 5px 0 0 5px;
    text-decoration: none !important;
    overflow: hidden;
    z-index: 999;
    transition: width 200ms ease;
}

#request-quote-tab[hidden] {
    display: none;
}

#request-quote-tab .tab,
#contact-tab .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 50px;
    height: 150px;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* Native sideways text avoids rasterising a rotated horizontal label. */
@supports (writing-mode: sideways-lr) {
    #request-quote-tab .tab,
    #contact-tab .tab {
        writing-mode: sideways-lr;
        transform: none;
    }
}

#request-quote-tab:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

#contact-tab,
#contact-tab.active {
    transition: right 200ms ease;
}

/* Extend the coloured edge with the label, keeping both tabs flush right. */
@media (hover: hover) and (pointer: fine) {
    #request-quote-tab:hover {
        width: 62px;
    }

    #contact-tab:not(.active):hover {
        right: -238px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #request-quote-tab,
    #contact-tab,
    #contact-tab.active {
        transition: none;
    }
}
