/* LNP Law Agent - Premium Styles (v6.0.4) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --lnp-primary: #B8860B;
    /* Dark Goldenrod/Gold */
    --lnp-primary-dark: #8B6508;
    --lnp-secondary: #0F172A;
    /* Slate 900 / Navy */
    --lnp-secondary-light: #1E293B;
    --lnp-bg: #FFFFFF;
    --lnp-text: #334155;
    --lnp-light: #F8FAFC;
    --lnp-border: #E2E8F0;
    --lnp-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Chat Widget Container */
#lnp-chat-widget {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    left: auto !important;
    width: 380px;
    height: 600px;
    background: var(--lnp-bg);
    box-shadow: var(--lnp-shadow);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    z-index: 2147483647 !important;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#lnp-chat-widget.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
#lnp-chat-header {
    background: linear-gradient(135deg, var(--lnp-secondary) 0%, #334155 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--lnp-primary);
}

.lnp-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.lnp-status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.lnp-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lnp-btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
}

.lnp-btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Body */
#lnp-chat-body {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    background: var(--lnp-light);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Welcome Screen */
#lnp-welcome-screen {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

.lnp-agent-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.lnp-agent-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--lnp-primary) 0%, var(--lnp-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(184, 134, 11, 0.3);
}

.lnp-agent-info {
    display: flex;
    flex-direction: column;
}

.lnp-agent-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--lnp-secondary);
}

.lnp-agent-title {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.lnp-welcome-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--lnp-text);
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--lnp-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Action Grid */
.lnp-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.lnp-action-card {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--lnp-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

/* Unified Premium Hover - Soft Gold */
.lnp-action-card:hover {
    border-color: var(--lnp-primary);
    background: linear-gradient(to right, #fff, #fffbf0);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(184, 134, 11, 0.15);
}

.lnp-card-icon {
    font-size: 24px;
    background: var(--lnp-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.lnp-card-text {
    display: flex;
    flex-direction: column;
}

.lnp-card-text strong {
    font-size: 14px;
    color: var(--lnp-secondary);
    margin-bottom: 2px;
}

.lnp-card-text span {
    font-size: 11px;
    color: #64748b;
}

/* Chat Messages */
#lnp-messages-container {
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.lnp-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.lnp-message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: pre-wrap;
}

.bot-message {
    align-self: flex-start;
}

.bot-message .lnp-message-content {
    background: #fff;
    color: var(--lnp-text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--lnp-border);
}

.user-message {
    align-self: flex-end;
}

.user-message .lnp-message-content {
    background: linear-gradient(135deg, var(--lnp-primary) 0%, var(--lnp-primary-dark) 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(184, 134, 11, 0.2);
}

.lnp-message-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

/* Booking Form Overlay */
#lnp-booking-form {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 20;
    display: flex;
    flex-direction: column;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#lnp-booking-form.active {
    top: 0;
}

.lnp-form-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--lnp-border);
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
}

/* Icon Back Button Styled */
#lnp-back-booking {
    border: 1px solid var(--lnp-border);
    background: #fff;
    width: 40px;
    /* Bigger touch target */
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--lnp-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

#lnp-back-booking:hover {
    background: var(--lnp-light);
    color: var(--lnp-primary);
    border-color: var(--lnp-primary);
    transform: translateX(-2px);
    /* Subtle hint */
}

.lnp-form-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--lnp-secondary);
}

.lnp-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.lnp-form-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    text-align: center;
    background: var(--lnp-light);
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed var(--lnp-border);
}

.lnp-form-group {
    margin-bottom: 16px;
}

.lnp-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--lnp-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lnp-form-group input,
.lnp-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--lnp-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: #fff;
}

.lnp-form-group input:focus,
.lnp-form-group textarea:focus {
    outline: none;
    border-color: var(--lnp-primary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.lnp-btn-block {
    width: 100%;
    background: var(--lnp-secondary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.3);
}

.lnp-btn-block:hover {
    background: var(--lnp-secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(15, 23, 42, 0.25);
}

.lnp-btn-secondary {
    background: #e2e8f0;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
}

/* Input Area */
#lnp-chat-input-area {
    padding: 16px;
    background: #fff;
    border-top: 1px solid var(--lnp-border);
    display: flex;
    gap: 10px;
    align-items: center;
}

#lnp-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--lnp-border);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: var(--lnp-light);
}

#lnp-chat-input:focus {
    border-color: var(--lnp-primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.1);
}

#lnp-chat-send {
    background: var(--lnp-secondary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.3);
}

#lnp-chat-send:hover {
    background: var(--lnp-secondary-light);
    transform: scale(1.05);
}

#lnp-chat-send svg {
    margin-left: -2px;
}

/* Launcher Button */
#lnp-chat-launcher {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    left: auto !important;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--lnp-primary) 0%, var(--lnp-primary-dark) 100%);
    color: #fff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(184, 134, 11, 0.5);
    cursor: pointer;
    z-index: 2147483647 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#lnp-chat-launcher:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 20px 25px -5px rgba(184, 134, 11, 0.6);
}

#lnp-chat-launcher svg {
    transition: transform 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 480px) {
    #lnp-chat-widget {
        width: 100%;
        height: 100%;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        border-radius: 0;
    }

    #lnp-chat-launcher {
        bottom: 20px !important;
        right: 20px !important;
    }
}