
/* =====================================================
   SHIFTIFY - AIRA CHATBOT
   File: resources/css/support.css
===================================================== */

#aira-widget,
#aira-widget * {
    box-sizing: border-box;
}

#aira-widget {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.45;
}

/* =====================================================
   FLOATING BUTTON
===================================================== */

.aira-float-btn {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 9998;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 11px 17px;
    border: 0;
    border-radius: 30px;

    background: #0050A0;
    color: #fff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 5px 20px rgba(0, 45, 100, .22);

    transition: .2s ease;
}

.aira-float-btn:hover {
    background: #003F80;
    transform: translateY(-2px);
}

.aira-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    border-radius: 50%;
    background: rgba(255, 255, 255, .16);

    font-size: 17px;
}

.aira-float-label {
    white-space: nowrap;
}


/* =====================================================
   CHAT MODAL
===================================================== */

.aira-modal {
    position: fixed;
    right: 24px;
    bottom: 88px;

    z-index: 9999;

    display: flex;
    flex-direction: column;

    width: 370px;
    max-width: calc(100vw - 32px);

    height: 540px;
    max-height: calc(100dvh - 115px);

    background: #fff;

    border: 1px solid #e6edf4;
    border-radius: 15px;

    box-shadow: 0 12px 45px rgba(13, 38, 67, .20);

    overflow: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.98);

    transition: opacity .2s ease,
                visibility .2s ease,
                transform .2s ease;
}

.aira-modal.aira-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}


/* =====================================================
   MODAL HEADER
===================================================== */

.aira-modal-header {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 13px 15px;

    background: #0050A0;
    color: #fff;
}

.aira-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aira-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: #fff;
    color: #0050A0;

    font-size: 17px;
    font-weight: 700;
}

.aira-profile-info h3 {
    margin: 0;
    color: #fff;

    font-size: 15px;
    font-weight: 700;
}

.aira-status {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-top: 2px;

    color: rgba(255, 255, 255, .85);
    font-size: 10px;
}

.aira-online-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: #43db91;
}

.aira-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.aira-header-actions button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 29px;
    height: 29px;

    padding: 0;
    border: 0;
    border-radius: 6px;

    background: rgba(255, 255, 255, .12);
    color: #fff;

    font-size: 21px;
    line-height: 1;

    cursor: pointer;
    transition: .2s ease;
}

.aira-header-actions button:hover {
    background: rgba(255, 255, 255, .25);
}


/* =====================================================
   MODAL BODY
===================================================== */

.aira-modal-body {
    flex: 1;
    min-height: 0;

    padding: 14px;

    background: #f7f9fc;

    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.aira-modal-body::-webkit-scrollbar {
    width: 5px;
}

.aira-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}


/* =====================================================
   WELCOME SECTION
===================================================== */

.aira-welcome {
    margin-bottom: 15px;
    padding: 13px;

    text-align: center;

    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 11px;
}

.aira-welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 35px;
    height: 35px;

    margin: 0 auto 7px;

    border-radius: 50%;

    background: #fff0e9;
    color: #FF5A00;

    font-size: 18px;
}

.aira-welcome h4 {
    margin: 0 0 5px;

    color: #173653;
    font-size: 14px;
    font-weight: 700;
}

.aira-welcome p {
    margin: 0;

    color: #68788b;
    font-size: 11px;
    line-height: 1.5;
}


/* =====================================================
   CHAT MESSAGES
===================================================== */

.aira-messages {
    display: flex;
    flex-direction: column;
    gap: 11px;

    margin-bottom: 15px;
}

.aira-message {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    max-width: 92%;
}

.aira-message.bot {
    align-self: flex-start;
}

.aira-message.customer {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.aira-message-avatar {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    border-radius: 50%;

    background: #e7f0fa;
    color: #0050A0;

    font-size: 10px;
    font-weight: 700;
}

.aira-message.customer .aira-message-avatar {
    background: #fff0e8;
    color: #e85200;
}

.aira-message-content {
    padding: 9px 11px;

    border: 1px solid #e9eef5;
    border-radius: 3px 11px 11px 11px;

    background: #fff;
    color: #34495e;

    font-size: 12px;
    line-height: 1.55;

    overflow-wrap: anywhere;
}

.aira-message.customer .aira-message-content {
    border-color: #0050A0;
    border-radius: 11px 3px 11px 11px;

    background: #0050A0;
    color: #fff;
}


/* =====================================================
   QUICK ACTIONS
===================================================== */

.aira-quick-section {
    margin-top: 10px;
}

.aira-quick-title {
    margin: 0 0 9px;

    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.aira-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.aira-quick-actions button {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;
    padding: 10px 9px;

    border: 1px solid #e1eaf3;
    border-radius: 8px;

    background: #fff;
    color: #25445f;

    font-size: 11px;
    font-weight: 600;
    text-align: left;

    cursor: pointer;
    transition: .2s ease;
}

.aira-quick-actions button:hover {
    border-color: #0050A0;
    background: #f0f6fc;
    color: #0050A0;
}

.aira-action-icon {
    flex-shrink: 0;
    font-size: 16px;
}


/* =====================================================
   COMPLAINT FORM
===================================================== */

.aira-ticket-form {
    margin-top: 5px;
    padding: 13px;

    border: 1px solid #e4ebf3;
    border-radius: 10px;

    background: #fff;
}

.aira-ticket-form[hidden],
.aira-modal-footer[hidden],
.aira-quick-section[hidden] {
    display: none !important;
}

.aira-form-heading {
    margin-bottom: 13px;
}

.aira-form-heading h4 {
    margin: 0 0 4px;

    color: #173653;
    font-size: 14px;
    font-weight: 700;
}

.aira-form-heading p {
    margin: 0;

    color: #718096;
    font-size: 11px;
}

.aira-field {
    margin-bottom: 11px;
}

.aira-field label {
    display: block;
    margin-bottom: 5px;

    color: #34495e;
    font-size: 11px;
    font-weight: 600;
}

.aira-field label span {
    color: #e64d36;
}

.aira-field input,
.aira-field select,
.aira-field textarea {
    display: block;
    width: 100%;

    padding: 9px 10px;

    border: 1px solid #dce4ed;
    border-radius: 6px;
    outline: none;

    background: #fff;
    color: #25394d;

    font-family: inherit;
    font-size: 11px;

    transition: border-color .2s ease,
                box-shadow .2s ease;
}

.aira-field input:focus,
.aira-field select:focus,
.aira-field textarea:focus {
    border-color: #0050A0;
    box-shadow: 0 0 0 2px rgba(0, 80, 160, .08);
}

.aira-field textarea {
    min-height: 75px;
    resize: vertical;
}

.aira-field input::placeholder,
.aira-field textarea::placeholder {
    color: #a0aab7;
}

.aira-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;

    margin-top: 13px;
}

.aira-form-actions button {
    padding: 9px 13px;

    border: 0;
    border-radius: 6px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
    transition: .2s ease;
}

.aira-cancel-btn {
    background: #edf1f5;
    color: #526579;
}

.aira-cancel-btn:hover {
    background: #e0e6ed;
}

.aira-submit-btn {
    background: #0050A0;
    color: #fff;
}

.aira-submit-btn:hover {
    background: #003e80;
}

.aira-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}


/* =====================================================
   CHAT FOOTER
===================================================== */

.aira-modal-footer {
    flex-shrink: 0;

    padding: 11px 13px 8px;

    border-top: 1px solid #e9eef5;
    background: #fff;
}

.aira-modal-footer form {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 5px;

    border: 1px solid #dce5ee;
    border-radius: 9px;

    background: #f9fbfd;
}

.aira-modal-footer input {
    flex: 1;
    min-width: 0;

    padding: 7px 8px;

    border: 0;
    outline: none;

    background: transparent;
    color: #25394d;

    font-family: inherit;
    font-size: 12px;
}

.aira-modal-footer input::placeholder {
    color: #98a5b4;
}

.aira-modal-footer form button {
    flex-shrink: 0;

    width: 33px;
    height: 33px;

    border: 0;
    border-radius: 7px;

    background: #0050A0;
    color: #fff;

    font-size: 17px;

    cursor: pointer;
    transition: .2s ease;
}

.aira-modal-footer form button:hover {
    background: #FF5A00;
}

.aira-modal-footer form button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.aira-footer-note {
    margin-top: 6px;

    color: #9aa6b4;
    font-size: 9px;
    text-align: center;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 576px) {

    .aira-float-btn {
        right: 15px;
        bottom: 15px;

        padding: 10px 13px;
    }

    .aira-modal {
        right: 0;
        bottom: 0;

        width: 100%;
        max-width: 100%;

        height:  min(650px, 88dvh);
        max-height: 88dvh;

        border-radius: 15px 15px 0 0;
    }

    .aira-modal-header {
        padding: 12px 13px;
    }

    .aira-modal-body {
        padding: 12px;
    }

    .aira-welcome {
        padding: 11px;
    }

    .aira-quick-actions button {
        padding: 10px 7px;
        font-size: 10px;
    }

}

@media (max-width: 360px) {

    .aira-quick-actions {
        grid-template-columns: 1fr;
    }

    .aira-float-label {
        font-size: 11px;
    }

}

/* =====================================================
   AIRA - PREMIUM GLOW & ATTENTION ANIMATION
===================================================== */

.aira-float-btn {
    position: fixed;
    isolation: isolate;
    overflow: visible;

    animation: aira-float-glow 2.8s ease-in-out infinite;
}

/* Soft glowing outer ring */
.aira-float-btn::before {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: -1;

    border-radius: 40px;
    border: 2px solid rgba(255, 90, 0, .48);

    box-shadow:
        0 0 8px rgba(255, 90, 0, .35),
        0 0 18px rgba(0, 80, 160, .35);

    opacity: .7;

    animation: aira-ring-pulse 2.8s ease-out infinite;
    pointer-events: none;
}

/* Moving shine across the button */
.aira-float-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;

    width: 65%;
    height: 100%;

    border-radius: inherit;

    background: linear-gradient(
        110deg,
        transparent,
        rgba(255, 255, 255, .30),
        transparent
    );

    transform: skewX(-20deg);
    animation: aira-shine 4.5s ease-in-out infinite;

    pointer-events: none;
}

/* Floating icon animation */
.aira-float-icon {
    animation: aira-icon-glow 2s ease-in-out infinite;
}

/* Button breathing glow */
@keyframes aira-float-glow {
    0%, 100% {
        box-shadow:
            0 5px 20px rgba(0, 45, 100, .25),
            0 0 8px rgba(0, 80, 160, .15);
    }

    50% {
        box-shadow:
            0 7px 25px rgba(0, 45, 100, .35),
            0 0 20px rgba(255, 90, 0, .30);
    }
}

/* Expanding orange-blue ring */
@keyframes aira-ring-pulse {
    0% {
        transform: scale(1);
        opacity: .7;
    }

    70% {
        transform: scale(1.09);
        opacity: 0;
    }

    100% {
        transform: scale(1.09);
        opacity: 0;
    }
}

/* Light sweep */
@keyframes aira-shine {
    0%, 65% {
        left: -100%;
    }

    85%, 100% {
        left: 150%;
    }
}

/* Icon subtle glow */
@keyframes aira-icon-glow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 12px rgba(255, 255, 255, .45);
        transform: scale(1.08);
    }
}

/* Hover interaction */
.aira-float-btn:hover {
    animation-play-state: paused;
    transform: translateY(-4px) scale(1.03);

    box-shadow:
        0 8px 28px rgba(0, 45, 100, .35),
        0 0 22px rgba(255, 90, 0, .35);
}

.aira-float-btn:hover::before,
.aira-float-btn:hover::after {
    animation-play-state: paused;
}

/* Stop animation when chat is open */
#aira-widget:has(.aira-modal.aira-open) .aira-float-btn {
    animation: none;
    box-shadow: 0 4px 15px rgba(0, 45, 100, .2);
}

#aira-widget:has(.aira-modal.aira-open) .aira-float-btn::before,
#aira-widget:has(.aira-modal.aira-open) .aira-float-btn::after {
    animation: none;
    opacity: 0;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .aira-float-btn,
    .aira-float-btn::before,
    .aira-float-btn::after,
    .aira-float-icon {
        animation: none !important;
        transition: none !important;
    }
}

/* =====================================================
   MOBILE - PREVENT AIRA OVERLAPPING PAYMENT BUTTON
===================================================== */

@media (max-width: 576px) {

    /* Move Aira floating button higher */
    .aira-float-btn {
        right: 15px;
        bottom: 85px;
        z-index: 9998;
    }

    /* Keep chat modal above the floating button */
    .aira-modal {
        right: 0;
        bottom: 0;
        z-index: 9999;
    }

}

/* Smaller screens */
@media (max-width: 380px) {

    .aira-float-btn {
        bottom: 90px;
        padding: 9px 12px;
    }

}

/* =========================================================
   AIRA - FOOTER OVERLAP FIX
========================================================= */

/* DESKTOP */

@media (min-width: 768px) {

    .aira-float-btn {
        right: 24px;
        bottom: 22px;
        z-index: 9998;
    }

}

/* MOBILE - COMPACT CIRCULAR CHAT BUTTON */

@media (max-width: 767px) {

    .aira-float-btn {
        position: fixed;
        right: 15px;
        bottom: 85px;

        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;

        padding: 0;
        gap: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 50%;
        z-index: 9998;
    }

    /* Hide Chat with Aira text */
    .aira-float-label {
        display: none !important;
    }

    /* Center chat icon */
    .aira-float-icon {
        width: 27px;
        height: 27px;
        margin: 0;
        font-size: 19px;
    }

    /* Circular glow */
    .aira-float-btn::before {
        border-radius: 50%;
    }

    /* Preserve full-screen chat functionality */
    .aira-modal {
        bottom: 0;
        right: 0;
        z-index: 9999;
    }
}

/* SMALL MOBILE */

@media (max-width: 380px) {

    .aira-float-btn {
        right: 13px;
        bottom: 90px;
        width: 50px;
        height: 50px;
    }

}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    .aira-float-btn,
    .aira-float-btn::before,
    .aira-float-btn::after {
        animation: none !important;
    }
}
