/* ========================================
   Lawyer Search (fal-) Styles
   ======================================== */

/* Default CSS variables (can be overridden by host app) */
:root {
    --uvp-primary: #80114C;
    --uvp-primary-dark: #4a1a51;
    --uvp-primary-light: #8b3594;
    --uvp-secondary: #a41e4d;
    --uvp-accent: #d4a5c9;
    --uvp-text: #333333;
    --uvp-text-light: #666666;
    --uvp-border: #e0e0e0;
    --uvp-border-focus: #6b2574;
    --uvp-background: #ffffff;
    --uvp-background-light: #f8f5f9;
    --uvp-error: #dc3545;
    --uvp-success: #28a745;
    --uvp-info: #6b2574;
}

/* Dashboard card/row classes used by LawyerSearchPage */
.fal-container .db-card {
    background: white;
    border: 1px solid #dddbd6;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(111, 17, 76, 0.04);
    overflow: hidden;
}

.fal-container .db-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.fal-container .db-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--uvp-primary);
}

.fal-container .db-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 3px;
}

.fal-container .db-row-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2b2229;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fal-container .db-row-subtitle {
    font-size: 0.8125rem;
    color: #5c4f58;
    margin-bottom: 6px;
}

.fal-container .db-row-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fal-container .db-row-meta span {
    font-size: 0.75rem;
    color: #9a8e96;
}

.fal-container {
    display: flex;
    gap: 2rem;
    min-height: calc(100vh - 140px);
}

/* Left Side */
.fal-left {
    flex: 0 0 65%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: calc(100vh - 160px);
    position: sticky;
    top: 80px;
}

/* Page Header */
.fal-page-header {
    padding: 1.25rem 1.5rem 1rem;
}

/* Chat Section */
.fal-chat-section {
    background: white;
    border-radius: 12px;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.fal-chat-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #dddbd6;
    background: white;
}

.fal-chat-titlebar-label {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--uvp-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fal-chat-titlebar-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--uvp-success);
}

.fal-chat-titlebar-badge {
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
}

.fal-chat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.fal-new-chat-btn {
    background: white;
    color: var(--uvp-text);
    border: 1px solid #C4D0E8;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.fal-new-chat-btn:hover:not(:disabled) {
    background: #e8edf5;
    border-color: #C4D0E8;
}

.fal-new-chat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fal-page-header h1 {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--uvp-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.fal-page-header p {
    color: #5c4f58;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

.fal-quick-prompts {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}



.fal-prompt-chip {
    background: white;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid #ccc;
    color: #333;
    font-weight: 400;
}

.fal-prompt-chip:hover {
    border-color: var(--uvp-primary);
    color: var(--uvp-primary);
    background: #fdf6fa;
}

.fal-chat-messages {
    flex: 1;
    padding: 24px 20px;
    overflow-y: auto;
    background: #f8f7f5;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fal-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: falFadeIn 0.3s ease;
}

@keyframes falFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.fal-message.bot {
    justify-content: flex-start;
}

.fal-message.user {
    justify-content: flex-end;
}

.fal-message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e8d4e2;
    box-shadow: 0 2px 8px rgba(123, 45, 94, 0.15);
}

.fal-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.fal-message-avatar.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #666;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 8px;
    border: none;
    box-shadow: none;
}

.fal-message-content {
    max-width: 85%;
    padding: 12px 16px;
    line-height: 1.55;
    font-size: 0.875rem;
    color: #333;
}

.fal-message.bot .fal-message-content {
    background: white;
    border-radius: 4px 14px 14px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.fal-message.user .fal-message-content {
    background: var(--uvp-primary);
    color: white;
    border-radius: 14px 14px 4px 14px;
    margin-left: auto;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--uvp-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Disabled state for prompt chips */
.fal-prompt-chip.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Disabled state for input and button */
.fal-chat-input input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.fal-chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quick reply buttons (Yes/No etc) */
.fal-quick-replies {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #F2F2EB;
    justify-content: flex-start;
}

.fal-quick-reply-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
    background: white;
    border: 1px solid #C4D0E8;
    color: var(--uvp-primary);
}

.fal-quick-reply-btn:hover {
    background: #e8edf5;
}

.fal-chat-input-container {
    padding: 14px 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.fal-chat-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.fal-chat-input input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid #e5e5e5;
    border-radius: 100px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    font-family: inherit;
    color: #333;
    outline: none;
    background: white;
}

.fal-chat-input input:focus {
    border-color: var(--uvp-primary);
}

.fal-chat-input input::placeholder {
    color: #aaa;
}

.fal-chat-input button {
    padding: 10px 20px;
    background: var(--uvp-primary);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.fal-chat-input button:hover {
    background: var(--uvp-primary-dark);
}

.fal-chat-input button:active {
    transform: scale(0.98);
}

/* Right Side - Sidebar */
.fal-sidebar {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fal-sidebar-card {
    overflow: hidden;
}


/* Featured Lawyer Cards */
.fal-lawyer-card {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #dddbd6;
    transition: background-color 0.12s ease;
    cursor: pointer;
    background: white;
}

.fal-lawyer-card:hover {
    background: #F2F2EB;
}

.fal-lawyer-card:last-child {
    border-bottom: none;
}

.fal-lawyer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #C4D0EA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.fal-lawyer-info {
    flex: 1;
}

.fal-lawyer-name {
    font-weight: 600;
    color: #2b2229;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.fal-lawyer-specialty {
    color: #5c4f58;
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

a.fal-lawyer-card-link {
    text-decoration: none;
    color: inherit;
}

.fal-lawyer-location {
    color: #9a8e96;
    font-size: 0.75rem;
}

.fal-badge {
    display: inline-block;
    background: var(--uvp-primary);
    color: white;
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    margin-left: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Featured Sponsored Card */
.fal-featured-card {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #dddbd6;
    cursor: pointer;
    background: white;
    transition: background-color 0.12s ease;
    align-items: flex-start;
}

.fal-featured-card:hover {
    background: #f8f5f9;
}

.fal-featured-card:last-child {
    border-bottom: none;
}

.fal-featured-hero {
    width: 60px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.fal-featured-avatar {
    width: 60px;
    height: 72px;
    border-radius: 8px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.fal-featured-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fal-featured-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.fal-practice-areas {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b2d5c;
    margin-bottom: 6px;
}

.fal-featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.fal-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.fal-tag.practice {
    background: #f0e6ee;
    color: #6b2d5c;
}

.fal-tag.service {
    background: #e8f5e9;
    color: #2e7d32;
}

/* CTA Card */
.fal-cta-card {
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(145deg, #3d0a2e, #80114C, #a8346e);
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(128, 17, 76, .35);
    position: sticky;
    bottom: 20px;
}

.fal-cta-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.fal-cta-circle.c1 {
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, .15);
}

.fal-cta-circle.c2 {
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, .12);
}

.fal-cta-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
    letter-spacing: -0.02em;
}

.fal-cta-text {
    color: rgba(255, 255, 255, .9);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 18px;
    font-weight: 300;
    position: relative;
}

.fal-cta-btn {
    display: inline-block;
    background: rgba(255, 255, 255, .95);
    color: var(--uvp-primary);
    border: none;
    border-radius: 50px;
    padding: 11px 22px;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    transition: transform .2s;
    text-decoration: none;
    position: relative;
}

.fal-cta-btn:hover {
    transform: scale(1.04);
}

@media (max-width: 1200px) {
    .fal-container {
        flex-direction: column;
    }

    .fal-left {
        flex: none;
        position: relative;
        top: 0;
        height: auto;
    }

    .fal-chat-section {
        min-height: 500px;
        max-height: 70vh;
    }

    .fal-sidebar {
        flex: none;
    }
}

@media (max-width: 768px) {
    .fal-container {
        gap: 1rem;
    }

    .fal-left {
        height: auto;
        position: relative;
        top: 0;
    }

    .fal-chat-section {
        height: calc(100dvh - 200px);
        min-height: 400px;
        max-height: calc(100dvh - 200px);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .fal-page-header {
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    .fal-page-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .fal-page-header p {
        font-size: 0.875rem;
        margin-bottom: 0;
    }

    .fal-quick-prompts {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .fal-prompt-chip {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .fal-chat-messages {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
        background: #f8f7f5;
    }

    .fal-message {
        gap: 0.5rem;
    }

    .fal-message-avatar {
        width: 32px;
        height: 32px;
    }

    .fal-message-content {
        max-width: 85%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .fal-chat-input-container {
        position: sticky;
        bottom: 0;
        padding: 0.75rem 1rem;
        background: white;
        border-top: 1px solid #dddbd6;
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(111, 17, 76, 0.04);
    }

    .fal-chat-input input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .fal-chat-input button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .fal-sidebar {
        display: none;
    }

    .fal-cta-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
}

