/*
 * Contact Us styles loaded by dtcvx_contactUsGenericAction through loadStyle.
 * This static resource supplies global CSS, including selectors for the rendered
 * Lightning accordion and button markup. Keep selector scope in mind when editing.
 */

/* Establish the chat accordion wrapper as the positioning reference for its status row. */
.support-contact-us-generic-action-wrap .contact-accordion-wrapper {
    position: relative;
}

    .hds-contact-us-container .support-contact-us-generic-action-wrap {
        border-bottom: 1px solid #D9DCE2;
    }

/*
 * Place the availability indicator and support hours beneath the chat heading.
 * Align the row's contents vertically and keep it above the accordion background.
 * Ignore pointer events so this overlay does not block clicks on the accordion header.
 */
.support-contact-us-generic-action-wrap .contact-status-wrapper {
    position: absolute;
    left: 45px;
    top: 64px;
    font-size: 14px;
    line-height: 14px;
    pointer-events: none;
    z-index: 1;
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

/*Rohit
.support-contact-us-generic-action-wrap .contact-status.additional {
    left: 300px;
}
    */

/* Shift the status row when its preceding chat section is unavailable. */
.support-contact-us-generic-action-wrap .contact-action-chat.unavailable~.contact-status {
    left: 38px;
}


/* Right to Left Languages --*/

html:dir(rtl) .support-contact-us-generic-action-wrap .contact-status-wrapper {
    right: 32px;
}

html:dir(rtl) .support-contact-us-generic-action-wrap .contact-status-wrapper .support-hours {
    text-align: right;
}

body:dir(rtl) .support-contact-us-generic-action-wrap .contact-status-wrapper .status-open-dot {
    margin-left: 6px;
}

body:dir(rtl) .hds-contact-us-container .slds-accordion__list-item .slds-accordion__summary-content {
    padding-right: 2rem;
}

/* Shift the status row when its preceding chat section is unavailable. */
body:dir(rtl) .support-contact-us-generic-action-wrap .contact-action-chat.unavailable~.contact-status-wrapper {
    right: 36px;
}


/*
 * Draw the green circular indicator shown while chat is available.
 * Reserve a fixed 8px diameter and a gap before the support-hours text;
 * prevent the dot from shrinking when the surrounding flex row is constrained.
 */
.support-contact-us-generic-action-wrap .contact-status .status-open-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #29A869;
    margin-right: 6px;
    flex-shrink: 0;
    pointer-events: auto;
}

/* Highlight the closed-chat label in red when the component renders that status. */
.support-contact-us-generic-action-wrap .contact-status .status-closed {
    color: #d0021b;
    white-space: pre;
}

/* Give the live-support label and configured availability hours a dark text color. */
.support-contact-us-generic-action-wrap .contact-status .support-hours {
    color: #333;
}

/* Add a repeating two-second glow to the open-chat dot using the keyframes below. */
.support-contact-us-generic-action-wrap .contact-status .status-open-dot {
    animation: dtcvxContactUsStatusGlow 2s ease-in-out infinite;
}

/*
 * Style action buttons inside expanded Contact Us accordion panels with the brand's
 * primary button colors and medium font. Center their labels in a 48px-high button
 * with a 4px corner radius and smooth style transitions.
 * The selector targets the action-button container, excluding the separate language row.
 */
.hds-contact-us-container .slds-accordion__section.slds-is-open .slds-accordion__content .button-container.plus-brands-contact-option-button button {
    display: flex;
    border-radius: 4px;
    border: 2px solid var(--plus-primary-button-background);
    background-color: var(--plus-primary-button-background);
    color: var(--plus-primary-button-label);
    font-weight: 600;
    height: 48px;
    transition: all .3s ease-out;
    font-family: var(--plus-medium-font-family);
    justify-content: center;
    align-items: center;
    line-height: 24px;
}

.hds-contact-us-container .slds-accordion__section.slds-is-open {
    padding-bottom: 0 !important;
}

/*
 * Apply the brand's primary hover color to both the action-button border and fill.
 * The important declarations take precedence over competing non-important hover rules.
 */
.hds-contact-us-container .slds-accordion__section.slds-is-open .slds-accordion__content .button-container.plus-brands-contact-option-button button:hover {
    border: 2px solid var(--plus-primary-button-background-hover) !important;
    background-color: var(--plus-primary-button-background-hover) !important;
}

/* CSS Overrides to current chat accordion --*/

lightning-accordion-section.unavailable.slds-accordion__list-item .slds-accordion__section .slds-accordion__summary {
    background-color: #FFF !important;
}

lightning-accordion-section.unavailable.slds-accordion__list-item .slds-accordion__section .slds-accordion__summary-content {
    color: #000 !important;
}

/* Hoops Summary Button Padding  --*/
.hds-contact-us-container .support-contact-us-generic-action-wrap .slds-accordion__list-item button.slds-accordion__summary-action {
    padding: 1.5rem 2.5rem 2.875rem 2.5rem;
    border-bottom: none;
}

.hds-contact-us-container .slds-accordion__list-item .slds-accordion__section.slds-is-open button.slds-accordion__summary-action:focus {
    outline-width: 0;
    outline-style: none;
    outline-color: #fff !important;
    box-shadow: none;
}

.support-contact-us-generic-action-wrap .contact-accordion-wrapper .chat-language-buttons:not(:has(> button.chat-language-button)) {
    display: none;
}


/*
.hds-contact-us-container .support-contact-us-generic-action-wrap .slds-accordion__list-item button.slds-accordion__summary-action:focus {
    outline: transparent !important;
    box-shadow: none !important;
}
    */

/* Hoops Summary - Hides Border  

button.section-control.slds-button.slds-button_reset.slds-accordion__summary-action {
    border-color: #FFF !important;
}
--*/

/* Pulse the green dot's drop shadow without changing the dot's size or layout. */
@keyframes dtcvxContactUsStatusGlow {

    /* Start and finish each cycle with a transparent shadow so the glow fades out. */
    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(41, 168, 105, 0.0));
    }

    /* At the midpoint, show a fully opaque green shadow to create the glow's peak. */
    50% {
        filter: drop-shadow(0 0 3px rgba(41, 168, 105, 1.0));
    }
}


/*-- Contact Action Chat --*/

/*
 * Give the chat accordion header extra bottom padding to accommodate the overlaid
 * status row beneath its title. The other padding values set the header's spacing.
 
.contact-action-chat button.section-control.slds-button.slds-button_reset.slds-accordion__summary-action {
    padding: 1.5rem 2.5rem 2.875rem 2.5rem;
    border-bottom: none;

}
*/

.hds-contact-action-container .actions-accordion slot div[c-dtcvx_contactus_dtcvx_contactus]:last-child .slds-accordion__section .slds-button.slds-button_reset.slds-accordion__summary-action {
    border-bottom: none;
}




/* Tablet and narrower viewports: apply these overrides at widths up to 64em. */
@media only screen and (max-width: 64em) {

    /*
     * Center content along the main axis of any div.breakspace using a compatible
     * layout such as flex. This global selector is not limited to the Contact Us wrapper.
     */
    div.breakspace {
        justify-content: center;
    }

}

/* Mobile and narrower viewports: apply these overrides at widths up to 47.9375em. */
@media only screen and (max-width: 47.9375em) {

    /* Keep the same centered breakspace alignment at this narrower breakpoint. */
    div.breakspace {
        justify-content: center;
    }

    .support-contact-us-generic-action-wrap .contact-status-wrapper {
        text-align: left;
        left: 45px;
        top: 64px;
        font-size: 14px;
        line-height: 14px;
        pointer-events: none;
        z-index: 1;
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 9px;
        justify-content: space-evenly;
    }

    .support-contact-us-generic-action-wrap .contact-status-wrapper .contact-status {
        text-align: left;
        justify-content: flex-start;
        display: flex;
        width: 100%;
        align-items: baseline;
        line-height: 20px;
    }

    .hds-contact-us-container .support-contact-us-generic-action-wrap .slds-accordion__list-item button.slds-accordion__summary-action {
        padding: 1.5rem 2.5rem 2.875rem 2.5rem;
    }

    c-dtcvx_contact-us-generic-action[data-id="va"] .support-contact-us-generic-action-wrap .slds-accordion__summary button.section-control.slds-button.slds-button_reset.slds-accordion__summary-action {
        padding: 1rem 2rem 5rem 2rem !important;
        border-bottom: none;
    }

    .hds-contact-us-outer.dynamic-content-container[c-dtcvx_contactUs_dtcvx_contactUs] {
        padding-bottom: 0 !important;
        margin-bottom: 1rem !important;
    }

}

/* Narrow mobile viewports: width-based overrides up to 29.9375em, regardless of orientation. */
@media only screen and (max-width: 29.9375em) {

    /* Reduce the chat header's padding while retaining space below the title for status. */
    .contact-action-chat button.section-control.slds-button.slds-button_reset.slds-accordion__summary-action {
        padding: 1rem 2rem 2.5rem 2rem;
    }

    .hds-contact-action-container .actions-accordion slot div[c-dtcvx_contactus_dtcvx_contactus]:last-child .slds-accordion__section .slds-button.slds-button_reset.slds-accordion__summary-action {
        padding: 1rem 2rem 3.5rem 2rem;
        border-bottom: none;
    }

    .support-contact-us-generic-action-wrap .contact-status-wrapper {
        left: 30px;
    }

    /*
     * Move the status row slightly left and upward to fit the narrower chat header.
     * Retain the compact text, vertical alignment, and click-through overlay behavior.
     * The earlier base rule continues to supply the row's z-index.
     */

    /* Shift the status row when its preceding chat section is unavailable. */
    .support-contact-us-generic-action-wrap .contact-action-chat.unavailable~.contact-status-wrapper {
        left: 30px;
    }


}

@supports (grid-template-rows: subgrid) and selector(&) {
    .support-contact-us-generic-action-wrap
    .contact-accordion-wrapper:is(
        :has(> .contact-action-chat .slds-accordion__section.slds-is-open):has(> .contact-action-chat + .contact-status-wrapper > .contact-status),
        :has(> .contact-action-phone .slds-accordion__section.slds-is-open):has(> .contact-action-phone + .contact-status-wrapper > .contact-status > .status-open-dot + .support-hours)
    ) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;

        & > :is(.contact-action-chat, .contact-action-phone),
        & > :is(.contact-action-chat, .contact-action-phone) > .slds-accordion__list-item,
        & > :is(.contact-action-chat, .contact-action-phone) > .slds-accordion__list-item > .slds-accordion__section {
            display: grid;
            grid-column: 1;
            grid-row: 1 / 4;
            grid-template-columns: minmax(0, 1fr);
            grid-template-rows: subgrid;
        }

        & > :is(.contact-action-chat, .contact-action-phone) .slds-accordion__section.slds-is-open {
            background-color: transparent;
        }

        & > :is(.contact-action-chat, .contact-action-phone) .slds-accordion__section > .slds-accordion__summary {
            grid-area: 1 / 1;
        }

        & > :is(.contact-action-chat, .contact-action-phone) + .contact-status-wrapper {
            grid-area: 2 / 1;
        }

        & > :is(.contact-action-chat, .contact-action-phone) .slds-accordion__section > .slds-accordion__content {
            grid-area: 3 / 1;
            background-color: #F3F8FB;
            margin: 0 -12px;
            padding-right: 40px;
            padding-left: 40px;
            display: flex;
            flex-direction: column;
        }
    }
}

/* Let chat and phone status rows contribute to the accordion's height. */
.support-contact-us-generic-action-wrap
:is(.contact-action-chat, .contact-action-phone) + .contact-status-wrapper:has(> .contact-status) {
    position: static;
    display: block;
    padding-block: 0 1.5rem;
    padding-inline: clamp(30px, 8vw, 45px);
    text-align: start;
}

/* Reduce the header padding that previously reserved space for the overlay. */
.support-contact-us-generic-action-wrap
.contact-accordion-wrapper:has(> :is(.contact-action-chat, .contact-action-phone) + .contact-status-wrapper > .contact-status)
> :is(.contact-action-chat, .contact-action-phone) button.slds-accordion__summary-action {
    padding-block-end: 0.5rem !important;
}

.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper > .contact-status {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.25rem 0.5rem;
    line-height: 20px;
    text-align: start;
}

/* Move the hours below the closed label when the two no longer fit. */
.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status:has(> .status-closed) {
    flex-wrap: wrap;
}

/* Keep separator elements from occupying a flex line on their own. */
.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
.status-closed + span:not(.support-hours) {
    display: none;
}

.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status:has(> .status-closed + .status-closed-separator + .support-hours) {
    column-gap: 0.875rem;
    overflow: clip;
}

.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status > .status-closed:has(+ .status-closed-separator + .support-hours) {
    white-space: pre-wrap;
}

.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status > .status-closed + .status-closed-separator + .support-hours {
    position: relative;
}

/* The dot falls outside the row and is clipped when the hours wrap to its start. */
.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status > .status-closed + .status-closed-separator + .support-hours::before {
    content: "";
    position: absolute;
    inset-block-start: calc(0.5lh - 1.5px);
    inset-inline-end: calc(100% + 0.375rem);
    inline-size: 3px;
    block-size: 3px;
    border-radius: 50%;
    background-color: currentColor;
}

.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status > span {
    flex: 0 1 max-content;
    min-inline-size: 0;
    overflow-wrap: anywhere;
}

/* Keep the green availability dot beside the hours. */
.support-contact-us-generic-action-wrap
.slds-accordion__list-item + .contact-status-wrapper
> .contact-status > .status-open-dot {
    flex: 0 0 8px;
    margin: 0;
}

/* Keep the dot beside the hours as the text wraps. */
.support-contact-us-generic-action-wrap
.contact-action-phone + .contact-status-wrapper
> .contact-status:has(> .status-open-dot + .support-hours) {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    column-gap: 0.5rem;
    line-height: 20px;
    text-align: start;
}

.support-contact-us-generic-action-wrap
.contact-action-phone + .contact-status-wrapper
> .contact-status > .status-open-dot:has(+ .support-hours) {
    margin: 6px 0 0; /* Center the 8px dot on the first 20px line. */
}

.support-contact-us-generic-action-wrap
.contact-action-phone + .contact-status-wrapper
> .contact-status > .status-open-dot + .support-hours {
    white-space: normal;
    overflow-wrap: anywhere;
}
