/**
 * PackBot - AI Travel Assistant Styles
 * Minimalist design matching PackLightHub brand
 */

/* ==================== CHAT WIDGET CONTAINER ==================== */
.packbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

/* ==================== CHAT BUTTON (Collapsed State) ==================== */
.packbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2D3A3A 0%, #3D4A4A 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(45, 58, 58, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.packbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(45, 58, 58, 0.4);
}

.packbot-toggle.active {
    transform: scale(0.9);
}

/* Notification badge */
.packbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ==================== CHAT WINDOW ==================== */
.packbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.packbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== CHAT HEADER ==================== */
.packbot-header {
    background: linear-gradient(135deg, #2D3A3A 0%, #3D4A4A 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.packbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.packbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.packbot-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.packbot-name {
    font-weight: 600;
    font-size: 16px;
}

.packbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.packbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.packbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==================== CHAT MESSAGES ==================== */
.packbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.packbot-messages::-webkit-scrollbar {
    width: 6px;
}

.packbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.packbot-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

/* Message bubbles */
.message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2D3A3A;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: #C9D6C5;
}

.message-content {
    max-width: 75%;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
}

.message.bot .message-bubble {
    background: white;
    color: #2D3A3A;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.user .message-bubble {
    background: #2D3A3A;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #9CA3AF;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Product recommendations in messages */
.product-recommendation {
    background: #F3F4F6;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    border-left: 3px solid #2D3A3A;
}

.product-recommendation h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #2D3A3A;
}

.product-recommendation p {
    font-size: 13px;
    margin: 0 0 8px 0;
    color: #6B7280;
}

.product-recommendation .price {
    font-weight: 600;
    color: #2D3A3A;
    font-size: 16px;
    margin-bottom: 8px;
}

.product-recommendation a {
    display: inline-block;
    background: #2D3A3A;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.product-recommendation a:hover {
    background: #3D4A4A;
}

/* Weather display */
.weather-display {
    background: linear-gradient(135deg, #E8E4DD 0%, #C9D6C5 100%);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}

.weather-display h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #2D3A3A;
}

.weather-display .temp {
    font-size: 28px;
    font-weight: 700;
    color: #2D3A3A;
}

.weather-display .condition {
    font-size: 14px;
    color: #6B7280;
    margin-top: 4px;
}

/* ==================== INPUT AREA ==================== */
.packbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.packbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.packbot-input {
    flex: 1;
    background: #F3F4F6;
    border: 2px solid transparent;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    resize: none;
    max-height: 120px;
    min-height: 44px;
    transition: all 0.2s;
}

.packbot-input:focus {
    outline: none;
    border-color: #2D3A3A;
    background: white;
}

.packbot-send-btn,
.packbot-voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #2D3A3A;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.packbot-send-btn:hover,
.packbot-voice-btn:hover {
    background: #3D4A4A;
    transform: scale(1.05);
}

.packbot-send-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

.packbot-voice-btn.listening {
    background: #ef4444;
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* Quick actions */
.packbot-quick-actions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.packbot-quick-actions::-webkit-scrollbar {
    height: 4px;
}

.quick-action-btn {
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quick-action-btn:hover {
    background: #2D3A3A;
    color: white;
    border-color: #2D3A3A;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 480px) {
    .packbot-container {
        bottom: 10px;
        right: 10px;
    }

    .packbot-window {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        height: calc(100vh - 100px);
    }

    .packbot-toggle {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .message-content {
        max-width: 85%;
    }
}

/* ==================== EMAIL CAPTURE STYLES ==================== */
.email-prompt {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    color: white;
}

.email-prompt p {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.email-prompt input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

.email-prompt button {
    width: 100%;
    padding: 10px 14px;
    background: white;
    color: #6366f1;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.email-prompt button:hover {
    background: #f3f4f6;
}

/* ==================== PACKING LIST STYLES ==================== */
.packing-list {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    border-left: 4px solid #10b981;
}

.packing-list h4 {
    color: #10b981;
    font-size: 14px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.packing-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.packing-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

.packing-list li:last-child {
    border-bottom: none;
}

.packing-list .price {
    font-weight: 600;
    color: #6366f1;
}

/* ==================== COMPARISON STYLES ==================== */
.comparison-table {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    font-size: 13px;
}

.comparison-table h4 {
    color: #2D3A3A;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-label {
    color: #6b7280;
}

.comparison-value {
    font-weight: 600;
    color: #2D3A3A;
}

/* ==================== ACCESSIBILITY ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
button:focus-visible {
    outline: 2px solid #2D3A3A;
    outline-offset: 2px;
}
