input:focus,
textarea:focus {
    border: 1px solid gray;
    outline: none;
}

.floating-action {
    position: fixed;
    right: 32px;
    bottom: 20px;
    gap: 1vw;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 10001;
    pointer-events: none;
}

.floating-btn {
    width: 54px;
    padding: unset;
    height: 54px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.floating-btn:active,
.floating-btn:focus,
.floating-btn:focus-visible,
.floating-btn:hover {
    border: none;
    outline: none;
}

.floating-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Keep the scroll-to-top icon appearance as the original image (avoid page-level filters) */
.scroll-to-top-btn img {
    filter: none !important;
}

.contact-btn.hidden {
    display: none;
}

.contact-sidebar-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 10002;
}

.contact-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.contact-sidebar-panel {
    width: 420px;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    margin-right: 29px;
    box-shadow: 0px 8px 32px 0px #0000001F;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(.2, .9, .2, 1);
    height: auto;
    max-height: calc(100vh - 200px); /* Account for bottom: 160px plus some top margin */
    bottom: 160px;
    right: 0;
    position: absolute;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 1001px) and (max-width: 1400px) {
    .contact-sidebar-panel {
        width: 380px;
        bottom: 150px;
        max-height: calc(100vh - 180px);
    }

    .contact-sidebar-header {
        padding: 15px 20px !important;
    }

    .contact-sidebar-header h3 {
        font-size: 1.25rem !important;
        margin-bottom: 4px !important;
    }

    .contact-sidebar-header p {
        font-size: 0.85rem !important;
        line-height: 1.5;
    }

    .contact-sidebar-body {
        padding: 12px 20px !important;
    }

    .message-form-label {
        font-size: 13px;
        margin-top: 0 !important;
    }

    .message-form-input,
    .message-form-textarea {
        padding: 8px 10px;
        font-size: 13px;
    }

    .message-form-textarea {
        min-height: 20px !important;
    }

    .message-form-submit {
        padding: 10px;
        font-size: 14px;
        margin-top: 10px;
    }
}

.contact-sidebar-overlay.active .contact-sidebar-panel {
    transform: translateX(0);
}

.contact-sidebar-header {
    background: #0271E4;
    color: #ffffff;
    padding: 22px;
}

.contact-sidebar-header .header-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6px;
    cursor: pointer;
}

.contact-sidebar-header .header-close-btn img {
    width: 18px;
    height: 18px;
    display: block;
}

.contact-sidebar-body {
    padding: 16px;
    overflow-y: auto;
}

.message-form-input,
.message-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e5ed;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}

.message-form-input::placeholder,
.message-form-textarea::placeholder {
    font-size: 14px;
}

.message-form-textarea {
    min-height: 100px;
    resize: none;
}

.message-form-submit {
    width: 100%;
    padding: 12px;
    background-color: #0271E4;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
}

.message-form-label {
    color: black;
}

@media (max-width: 1000px) {
    .floating-action {
        right: 1vw;
        bottom: 13px;
    }

    .contact-sidebar-panel {
        width: 100%;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
        height: auto;
        max-height: 90vh;
        position: fixed;
        left: 0;
        bottom: 0;
        top: auto;
        box-shadow: none;
    }

    .contact-sidebar-overlay.active .contact-sidebar-panel {
        transform: translateY(0);
    }

    .contact-sidebar-header .header-close-btn {
        display: inline-flex;
        width: 44px;
        height: 44px;
        top: 14px;
        right: 14px;
        padding: 8px;
    }

    .contact-sidebar-header .header-close-btn img {
        width: 44px;
        height: 44px;
    }

    .message-form-textarea {
        min-height: 60px;
    }

    .message-form-input,
    .message-form-textarea {
        padding: 8px 10px;
    }
}
@media (max-width: 767px) {
    .floating-btn img {
        width: 80%;
        height: 80%;
    }
    .floating-action {
       right: 1vw;
    }
}
