/* ============================================================
   Floating buttons on pages without the big inline styles
   (book, pay, quote accept, review): the AI assistant panel,
   the "Copied" message and the scroll-to-top button.
   Same look as the main pages; used with includes/floating-extras.php
   ============================================================ */

/* AI assistant panel */
.ai-aside {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--modal-bg, #fff);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--card-border, #e2eae7);
    visibility: hidden;
}

.ai-aside.open {
    right: 0;
    visibility: visible;
}

.ai-aside-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a3c34, #2a5c50);
    flex-shrink: 0;
}

.ai-aside-header .header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ai-aside-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-aside-header .title-group h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.ai-aside-header .title-group .status {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-aside-header .title-group .status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2ecc71;
    display: inline-block;
    animation: fx-pulse-dot 1.5s infinite;
    flex-shrink: 0;
}

@keyframes fx-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.ai-aside-header .close-aside {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-aside-header .close-aside:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.ai-aside-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7faf9;
}

.ai-aside-body .chat-message {
    padding: 10px 16px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fx-message-in 0.3s ease;
    overflow-wrap: break-word;
}

@keyframes fx-message-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-aside-body .chat-message.bot {
    background: #e8f1ee;
    color: #1f2d2a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ai-aside-body .chat-message.user {
    background: linear-gradient(135deg, #1a3c34, #2a5c50);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-aside-body .chat-message .time {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

.ai-aside-body .chat-message.user .time {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.ai-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 20px 8px;
    border-top: 1px solid #e2eae7;
    background: #fff;
}

.ai-quick-actions .quick-btn {
    padding: 6px 14px;
    border: 1px solid #e2eae7;
    border-radius: 20px;
    background: transparent;
    color: #1f2d2a;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.ai-quick-actions .quick-btn:hover {
    border-color: #2a5c50;
    color: #1a3c34;
    background: rgba(42, 92, 80, 0.06);
}

.ai-quick-actions .quick-btn i {
    font-size: 0.65rem;
}

.ai-aside-footer {
    padding: 12px 20px 16px;
    flex-shrink: 0;
    background: #fff;
}

.ai-aside-footer .chat-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-aside-footer .chat-input-group input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e2eae7;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.85rem;
    background: #fff;
    color: #1f2d2a;
    outline: none;
    min-width: 0;
}

.ai-aside-footer .chat-input-group input:focus {
    border-color: #2a5c50;
    box-shadow: 0 0 0 3px rgba(42, 92, 80, 0.15);
}

.ai-aside-footer .chat-input-group .send-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 50px;
    background: #1a3c34;
    color: #ffd700;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ai-aside-footer .chat-input-group .send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-aside-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

.ai-aside-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* "Copied" message */
.toast-notification {
    position: fixed;
    bottom: 160px;
    right: 80px;
    background: #132a24;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
    border-left: 4px solid #ffd700;
}

.toast-notification.active {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification i {
    margin-right: 8px;
    color: #ffd700;
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffd700;
    color: #1a3c34;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.25);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px) scale(1.05);
}

@media (max-width: 576px) {
    .scroll-top {
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
        bottom: 20px;
    }

    .toast-notification {
        right: 50px;
        bottom: 110px;
        font-size: 0.75rem;
        padding: 8px 14px;
    }
}

/* Reading progress on the scroll-to-top button (floating-extras.js; the main pages: site-premium.css) */
.scroll-top.pt-has-ring { overflow: visible; }
.scroll-top .pt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.scroll-top .pt-ring circle { fill: none; stroke-width: 3; }
.scroll-top .pt-ring-track { stroke: rgba(26, 60, 52, 0.18); }
.scroll-top .pt-ring-fill { stroke: #1a3c34; stroke-linecap: round; transition: stroke-dashoffset 0.12s linear; }
.scroll-top .pt-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.66rem; font-weight: 800; color: #1a3c34; letter-spacing: -0.3px; opacity: 0; transform: scale(0.6); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; }
.scroll-top.pt-has-ring > i { transition: opacity 0.2s ease, transform 0.2s ease; }
.scroll-top.is-scrolling .pt-pct { opacity: 1; transform: scale(1); }
.scroll-top.is-scrolling > i { opacity: 0; transform: scale(0.5); }
@media (max-width: 576px) { .scroll-top .pt-pct { font-size: 0.56rem; } }
