@charset "UTF-8";

/* ─────────────────────────────────────────
   AI Legal Assistant — v2.0
   ───────────────────────────────────────── */

.ai-form-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.6;
	margin-bottom: 7rem;
}

.ai-form-wrapper h3 {
    margin-top: 0;
    font-size: 24px;
}

.ai-form-wrapper > p {
    font-size: 16px;
    color: #444444;
    margin-bottom: 24px;
}

/* Required star */
.ai-required {
    color: #cc0000;
    margin-left: 2px;
}

/* Screen reader only */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* Inline field error */
.ai-field-error {
    display: block;
    color: #cc0000;
    font-size: 13px;
    margin-top: -16px;
    margin-bottom: 16px;
    min-height: 18px;
}

/* Labels */
.ai-form-wrapper label {
    display: block !important;
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 600;
    color: #222222;
}

/* ── State dropdown ── */
.ai-form-wrapper select {
    display: block !important;
    width: 100% !important;
    border: none !important;
    border-bottom: 2px solid #cccccc !important;
    border-radius: 0 !important;
    padding: 12px 4px !important;
    font-size: 17px !important;
    font-family: inherit !important;
    color: #222222 !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    margin-bottom: 24px !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color 0.3s ease !important;
}

.ai-form-wrapper select:focus {
    border-bottom-color: #1d4ed8 !important;
}

.ai-form-wrapper select:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.ai-form-wrapper select option {
    color: #222222;
    background: #ffffff;
}

/* ─────────────────────────────────────────
   Chat Window
   ───────────────────────────────────────── */

#ai-chat-window {
    display: none;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    margin-bottom: 16px;
    background: #f8f8f8;
    border-radius: 10px;
    border: 1px solid #eeeeee;
    scroll-behavior: smooth;
}

/* Bubbles */
.ai-bubble {
    margin-bottom: 16px;
    max-width: 85%;
    clear: both;
}

.ai-bubble--user {
    margin-left: auto;
    text-align: right;
}

.ai-bubble--ai {
    margin-right: auto;
    text-align: left;
}

.ai-bubble__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    color: #888888;
}

.ai-bubble--user .ai-bubble__label {
    color: #c44a0d;
}

.ai-bubble__text {
    display: inline-block;
    margin: 0;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

.ai-bubble--user .ai-bubble__text {
    background: #f55b14;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.ai-bubble--ai .ai-bubble__text {
    background: #ffffff;
    color: #222222;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Typing indicator */
.ai-bubble--typing .ai-bubble__text {
    padding: 14px 20px;
}

.ai-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #aaaaaa;
    border-radius: 50%;
    margin: 0 2px;
    animation: ai-bounce 1.2s infinite ease-in-out;
}

.ai-dot:nth-child(1) { animation-delay: 0s; }
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-6px); }
}

/* ── Input row (textarea + button side by side) ── */
.ai-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 4px;
}

.ai-input-row textarea {
    flex: 1;
    display: block !important;
    border: none !important;
    border-bottom: 2px solid #cccccc !important;
    border-radius: 0 !important;
    padding: 12px 4px !important;
    font-size: 16px !important;
    font-family: inherit !important;
    color: #222222 !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    resize: none !important;
    overflow: hidden !important;
    min-height: 44px !important;
    transition: border-color 0.3s ease !important;
    -webkit-appearance: none;
    appearance: none;
}

.ai-input-row textarea:focus {
    border-bottom-color: #1d4ed8 !important;
}

.ai-input-row button[type="submit"] {
    flex-shrink: 0;
    background: #f55b14;
    color: #ffffff;
    padding: 12px 22px;
    border: 2px solid #f55b14;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ai-input-row button[type="submit"]:hover {
    color: #f55b14;
    background: transparent;
    border-color: #f55b14;
}

.ai-input-row button[type="submit"]:disabled {
    background: #cccccc;
    border-color: #cccccc;
    color: #ffffff;
    cursor: not-allowed;
}

/* Disclaimer */
.ai-disclaimer {
    margin-top: 22px;
    font-size: 13px;
    color: #888888;
    line-height: 1.6;
    border-top: 1px solid #eeeeee;
    padding-top: 16px;
}

/* ─────────────────────────────────────────
   Mobile
   ───────────────────────────────────────── */
@media (max-width: 600px) {
    .ai-form-wrapper {
        padding: 20px 16px;
    }

    #ai-chat-window {
        max-height: 320px;
    }

    .ai-bubble {
        max-width: 95%;
    }

    .ai-input-row button[type="submit"] {
        padding: 12px 14px;
        font-size: 15px;
    }
}