/* TWLAdvisor — chat interface styles */

.twla-advisor {
    max-width: 680px;
    margin: 0 auto;
    font-family: Georgia, "Times New Roman", serif;
}

/* Chat window */
.twla-chat-window {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    padding: 16px;
    min-height: 320px;
    max-height: 480px;
    overflow-y: auto;
    margin-bottom: 12px;
}

/* Messages */
.twla-msg {
    margin-bottom: 14px;
    max-width: 85%;
    line-height: 1.6;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 8px;
}

.twla-msg-advisor {
    background: #f0f7f0;
    color: #1a1a1a;
    border-left: 3px solid #2c5f2e;
    margin-right: auto;
}

.twla-msg-user {
    background: #2c5f2e;
    color: #fff;
    margin-left: auto;
    text-align: right;
}

/* Typing dots */
.twla-typing {
    display: flex;
    gap: 4px;
    padding: 10px 4px;
}

.twla-typing span {
    width: 8px;
    height: 8px;
    background: #2c5f2e;
    border-radius: 50%;
    animation: twla-bounce 1.2s infinite ease-in-out;
}

.twla-typing span:nth-child(2) { animation-delay: 0.2s; }
.twla-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes twla-bounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40%           { transform: scale(1);   opacity: 1; }
}

/* Input row */
.twla-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.twla-user-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: Georgia, serif;
    font-size: 14px;
    resize: none;
    line-height: 1.5;
}

.twla-user-input:focus {
    outline: none;
    border-color: #2c5f2e;
}

.twla-send-btn {
    background: #2c5f2e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.twla-send-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Contact form */
.twla-contact-form {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    margin-top: 12px;
}

.twla-contact-intro {
    margin-bottom: 14px;
    font-size: 15px;
    color: #333;
}

.twla-field-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.twla-input {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    font-family: Georgia, serif;
}

.twla-input:focus {
    outline: none;
    border-color: #2c5f2e;
}

/* Consent disclosure (v3.0) */
.twla-disclosure {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    margin: 12px 0 14px;
}

.twla-disclosure a {
    color: #2c5f2e;
}

.twla-submit-btn {
    background: #2c5f2e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
    margin-top: 4px;
}

.twla-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.twla-submit-spinner {
    text-align: center;
    color: #555;
    font-size: 14px;
    padding: 10px 0;
}

.twla-thankyou {
    color: #2c5f2e;
    font-size: 15px;
    line-height: 1.7;
    padding: 10px 0;
}

/* Safety note */
.twla-safety-note {
    font-size: 11px;
    color: #999;
    margin-top: 12px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 480px) {
    .twla-field-row {
        flex-direction: column;
    }
    .twla-input-row {
        flex-direction: column;
    }
    .twla-send-btn {
        width: 100%;
    }
}
