/* Divine Floating Contact - frontend */

/* ---------- Vertical tab ---------- */

.dfc-tab {
    position: fixed;
    top: var(--dfc-tab-offset, 50%);
    transform: translateY(-50%);
    z-index: var(--dfc-z, 9990);
    display: block;
    padding: 16px 9px;
    background: var(--dfc-tab-bg, #4C3864);
    color: var(--dfc-tab-color, #fff);
    font-size: var(--dfc-tab-font, 14px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: .04em;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transition: filter .18s ease, padding .18s ease;
}

.dfc-tab:hover,
.dfc-tab:focus {
    color: var(--dfc-tab-color, #fff);
    text-decoration: none;
    filter: brightness(1.12);
    padding-left: 12px;
    padding-right: 12px;
}

.dfc-tab--right {
    right: 0;
    border-radius: var(--dfc-tab-radius, 8px) 0 0 var(--dfc-tab-radius, 8px);
}

.dfc-tab--left {
    left: 0;
    border-radius: 0 var(--dfc-tab-radius, 8px) var(--dfc-tab-radius, 8px) 0;
}

.dfc-tab--flip {
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
}

/* ---------- Round buttons ---------- */

.dfc-dock {
    position: fixed;
    bottom: var(--dfc-btn-bottom, 24px);
    z-index: var(--dfc-z, 9990);
    display: flex;
    flex-direction: column;
    gap: var(--dfc-btn-gap, 12px);
}

.dfc-dock--right {
    right: 20px;
    align-items: flex-end;
}

.dfc-dock--left {
    left: 20px;
    align-items: flex-start;
}

.dfc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--dfc-btn-size, 54px);
    height: var(--dfc-btn-size, 54px);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    transition: transform .18s ease, box-shadow .18s ease;
    overflow: hidden;
}

.dfc-btn:hover,
.dfc-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    text-decoration: none;
}

.dfc-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: var(--dfc-btn-size, 54px);
    height: var(--dfc-btn-size, 54px);
}

.dfc-btn svg {
    width: 45%;
    height: 45%;
    display: block;
}

.dfc-btn--call {
    background: var(--dfc-call-bg, #A7295C);
    color: var(--dfc-call-color, #fff);
}

.dfc-btn--wa {
    background: var(--dfc-wa-bg, #25D366);
    color: var(--dfc-wa-color, #fff);
}

/* Label colour is independent of the icon colour */

.dfc-btn--call .dfc-btn__label {
    color: var(--dfc-call-label, #fff);
}

.dfc-btn--wa .dfc-btn__label {
    color: var(--dfc-wa-label, #fff);
}

/* Hover labels, desktop only */

.dfc-btn__label {
    display: none;
    white-space: nowrap;
    padding-right: 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

@media (min-width: 1025px) {
    .dfc-dock--labels .dfc-btn {
        width: var(--dfc-btn-size, 54px);
        transition: width .22s ease, transform .18s ease, box-shadow .18s ease;
    }

    .dfc-dock--labels .dfc-btn__label {
        display: inline-block;
        opacity: 0;
        transition: opacity .18s ease;
    }

    .dfc-dock--labels .dfc-btn:hover,
    .dfc-dock--labels .dfc-btn:focus {
        width: auto;
    }

    .dfc-dock--labels .dfc-btn:hover .dfc-btn__label,
    .dfc-dock--labels .dfc-btn:focus .dfc-btn__label {
        opacity: 1;
    }

    .dfc-dock--left.dfc-dock--labels .dfc-btn__label {
        padding-right: 0;
        padding-left: 18px;
        order: -1;
    }
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
    .dfc-tab {
        padding: 12px 7px;
        font-size: calc(var(--dfc-tab-font, 14px) - 1px);
    }

    .dfc-dock--right {
        right: 14px;
    }

    .dfc-dock--left {
        left: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dfc-tab,
    .dfc-btn,
    .dfc-btn__label {
        transition: none;
    }
}

/* ---------- Modal ---------- */

.dfc-modal[hidden] {
    display: none;
}

.dfc-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--dfc-z, 9990) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dfc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 6, 16, .62);
    cursor: pointer;
}

.dfc-modal__box {
    position: relative;
    width: 100%;
    max-width: var(--dfc-modal-width, 560px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px 28px 26px;
    background: var(--dfc-modal-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.dfc-modal__title {
    margin: 0 0 18px;
    padding: 0 30px 0 0;
    color: var(--dfc-modal-title, #040618);
    font-size: 22px;
    line-height: 1.3;
}

.dfc-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--dfc-modal-title, #040618);
    cursor: pointer;
    opacity: .6;
    transition: opacity .18s ease, background .18s ease;
}

.dfc-modal__close:hover,
.dfc-modal__close:focus {
    opacity: 1;
    background: rgba(0, 0, 0, .07);
}

.dfc-modal__body input[type="text"],
.dfc-modal__body input[type="email"],
.dfc-modal__body input[type="tel"],
.dfc-modal__body input[type="url"],
.dfc-modal__body input[type="number"],
.dfc-modal__body textarea,
.dfc-modal__body select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dfc-modal__body p {
    margin: 0 0 14px;
}

body.dfc-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .dfc-modal {
        padding: 12px;
    }

    .dfc-modal__box {
        padding: 26px 18px 20px;
        max-height: calc(100vh - 24px);
    }

    .dfc-modal__title {
        font-size: 19px;
    }
}
