/* ============================================================
   Sam Ramirez - Interactive Floating AI Chat Widget Styles
   ============================================================ */

.sam-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: 'Roboto', sans-serif;
}

/* Floating Launcher Button */
.sam-chat-launcher {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0e3047 0%, #068285 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(14, 48, 71, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.62rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.sam-chat-launcher:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 35px rgba(6, 130, 133, 0.45);
}

.sam-chat-launcher .sam-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #f58025;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: samPulseBadge 2s infinite;
}

@keyframes samPulseBadge {
    0% { transform: scale(0.9); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.9; }
}

/* Chat Window Panel */
.sam-chat-window {
    width: 380px;
    height: 580px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(14, 48, 71, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 85px;
    right: 0;
    opacity: 0;
    transform: translateY(30px) scale(0.92);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(14, 48, 71, 0.08);
}

.sam-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chat Header */
.sam-chat-header {
    background: linear-gradient(135deg, #0e3047 0%, #068285 100%);
    padding: 20px 24px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sam-header-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sam-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sam-status-indicator {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid #068285;
}

.sam-header-meta h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sam-header-meta span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.78);
    display: block;
}

.sam-chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.2s;
    padding: 4px;
}

.sam-chat-close:hover {
    color: #ffffff;
}

/* Messages Box Area */
.sam-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

/* Bubble Styling */
.sam-msg-row {
    display: flex;
    width: 100%;
}

.sam-msg-row.sam-msg-agent { justify-content: flex-start; }
.sam-msg-row.sam-msg-user { justify-content: flex-end; }

.sam-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.sam-msg-agent .sam-bubble {
    background: #ffffff;
    color: #1e293b;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid rgba(14, 48, 71, 0.04);
}

.sam-msg-user .sam-bubble {
    background: #068285;
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(6, 130, 133, 0.18);
}

/* Typing indicator */
.sam-typing-bubble {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 12px 20px;
}

.sam-typing-dot {
    width: 7px;
    height: 7px;
    background: #64748b;
    border-radius: 50%;
    animation: samTyping 1.4s infinite ease-in-out both;
}

.sam-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.sam-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes samTyping {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Quick Action Suggestion Buttons */
.sam-quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sam-quick-btn {
    background: #ffffff;
    border: 1px solid #dce4e5;
    color: #0e3047;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sam-quick-btn:hover {
    border-color: #068285;
    background: rgba(6, 130, 133, 0.05);
    color: #068285;
}

/* Custom Contact channels styling */
.sam-contact-card {
    background: #ffffff;
    border: 1px solid rgba(14, 48, 71, 0.08);
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.sam-contact-card a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0e3047;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s;
}

.sam-contact-card a:hover {
    background: rgba(6, 130, 133, 0.08);
    color: #068285;
}

.sam-contact-card a i {
    width: 16px;
    text-align: center;
    color: #f58025;
}

/* Input Area Footer */
.sam-chat-input-area {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid rgba(14, 48, 71, 0.08);
    display: flex;
    gap: 10px;
    align-items: center;
}

.sam-chat-input-area input {
    flex: 1;
    border: 1.5px solid #dce4e5;
    border-radius: 30px;
    padding: 12px 18px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    color: #1e293b;
}

.sam-chat-input-area input:focus {
    border-color: #068285;
}

.sam-chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0e3047;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.sam-chat-send-btn:hover {
    background: #068285;
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 450px) {
    .sam-chat-window {
        width: calc(100vw - 40px);
        right: 0;
        bottom: 80px;
        height: 500px;
    }
}
