/*--------------------------------------------------------------
QUICK CONTACT WIDGET
Floating messenger + phone widget. Standalone file: it is loaded
through @stack('styles') so it stays outside the compiled
style.css build (assets/scss -> public/css/style.css).
--------------------------------------------------------------*/

.quick-contact {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1030;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 14px;
    font-family: var(--font-family-manrope, "Manrope", sans-serif);
    /* The closed panel still occupies layout space, so the wrapper covers a tall
       block in the corner. Without this it swallowed clicks on whatever sits
       underneath -- the footer social links, for one. Only the toggle and the
       open panel take pointer events. */
    pointer-events: none;
}

.quick-contact__toggle,
.quick-contact__panel {
    pointer-events: auto;
}

/*--------------------------------------------------------------
Toggle button
--------------------------------------------------------------*/

.quick-contact__toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--gradient-yellow, linear-gradient(125deg, #D89A26 14.31%, #FFCD70 86.5%));
    box-shadow: 0 10px 26px rgba(12, 26, 26, 0.28), inset 0 0 0 1px rgba(15, 31, 31, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.quick-contact__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(12, 26, 26, 0.36), inset 0 0 0 1px rgba(15, 31, 31, 0.08);
}

.quick-contact__toggle:focus-visible {
    outline: 3px solid var(--white, #ffffff);
    outline-offset: 3px;
}

/* Attention ring, drawn behind the button */
.quick-contact__toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--orange-dark, #D89A26);
    opacity: 0.55;
    z-index: -1;
    animation: quick-contact-pulse 2.4s ease-out infinite;
}

.quick-contact.is-open .quick-contact__toggle::before {
    animation: none;
    opacity: 0;
}

@keyframes quick-contact-pulse {
    0%   { transform: scale(1);    opacity: 0.55; }
    70%  { transform: scale(1.45); opacity: 0; }
    100% { transform: scale(1.45); opacity: 0; }
}

.quick-contact__icon {
    display: block;
    width: 26px;
    height: 26px;
    transition: transform 0.3s ease-out, opacity 0.2s ease-out;
}

.quick-contact__icon--close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

.quick-contact.is-open .quick-contact__icon--open {
    opacity: 0;
    transform: rotate(90deg);
}

.quick-contact.is-open .quick-contact__icon--close {
    opacity: 1;
    transform: rotate(0deg);
}

/*--------------------------------------------------------------
Panel
--------------------------------------------------------------*/

.quick-contact__panel {
    width: 272px;
    max-width: calc(100vw - 40px);
    padding: 20px;
    border-radius: 18px;
    background: var(--main-secondary, #0C1A1A);
    box-shadow: 0 18px 44px rgba(12, 26, 26, 0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0.25s;
}

.quick-contact.is-open .quick-contact__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.quick-contact__title {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--white, #ffffff);
}

.quick-contact__subtitle {
    margin: 4px 0 16px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.55);
}

.quick-contact__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.quick-contact__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--white, #ffffff);
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 0.25s ease-out, transform 0.25s ease-out;
}

.quick-contact__link:hover,
.quick-contact__link:focus-visible {
    background: rgba(216, 154, 38, 0.18);
    color: var(--white, #ffffff);
    transform: translateX(3px);
}

.quick-contact__link:focus-visible {
    outline: 2px solid var(--orange-dark, #D89A26);
    outline-offset: 2px;
}

/* Messenger icons already ship as a gold disc with a white glyph,
   so they sit on a transparent wrapper. Phone and e-mail get the
   same disc drawn in CSS with a white glyph on top. */
.quick-contact__link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.quick-contact__link-icon img {
    width: 34px;
    height: 34px;
}

.quick-contact__link-icon--fill {
    background: var(--gradient-yellow, linear-gradient(125deg, #D89A26 14.31%, #FFCD70 86.5%));
}

.quick-contact__link-icon--fill img,
.quick-contact__link-icon--fill svg {
    width: 17px;
    height: 17px;
}

.quick-contact__link-label {
    display: block;
    overflow-wrap: anywhere;
}

.quick-contact__separator {
    height: 1px;
    margin: 10px 2px;
    background: rgba(255, 255, 255, 0.1);
}

/*--------------------------------------------------------------
Responsive
--------------------------------------------------------------*/

@media (max-width: 575.98px) {
    .quick-contact {
        right: 16px;
        bottom: 16px;
        gap: 12px;
    }

    .quick-contact__toggle {
        width: 54px;
        height: 54px;
    }

    .quick-contact__panel {
        width: 260px;
        max-width: calc(100vw - 32px);
        padding: 18px;
    }
}

/*--------------------------------------------------------------
Reduced motion
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
    .quick-contact__toggle,
    .quick-contact__icon,
    .quick-contact__panel,
    .quick-contact__link {
        transition: none;
    }

    .quick-contact__toggle::before {
        animation: none;
        opacity: 0;
    }

    .quick-contact__toggle:hover,
    .quick-contact__link:hover {
        transform: none;
    }
}

/*--------------------------------------------------------------
Keeping the footer clear of the widget

The widget sits in the bottom-right corner of the viewport, which is
exactly where the footer's social links land once the page is scrolled
to the end -- the toggle covered the last icon. Lifting the bottom bar
clears the widget's band at every width, which a horizontal shift would
not: the container's right margin changes with every breakpoint.
Below 768px the social links are centred, so they never collide.
--------------------------------------------------------------*/

@media (min-width: 768px) {
    .copyright-area {
        padding-bottom: 100px;
    }
}

/*--------------------------------------------------------------
Layout shift fix: the closed panel was only transparent, so it still sat in
the flex column above the toggle. When the web font swapped in, its height
changed and pushed the toggle ~200px (CLS 0.155 on mobile). Taking the panel
out of the flow keeps the toggle anchored; it still opens right above it.
--------------------------------------------------------------*/
.quick-contact__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
}

@media (max-width: 575.98px) {
    .quick-contact__panel {
        bottom: calc(100% + 12px);
    }
}
