/* ===== AI Assistant Styles ===== */
/* Harrison Landscaping & Carpentry */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #4a7c59;
    --green-dark: #3b6347;
    --green-light: #eef4f0;
    --bg: #f7faf8;
    --text: #2b303a;
    --text-light: #6b7280;
    --border: #e2e8e4;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --radius: 8px;
    --user-bg: #e8f5e9;
    --ai-bg: #ffffff;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: var(--shadow);
}

/* ===== Header ===== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--green);
    color: var(--white);
    border-bottom: 3px solid var(--green-dark);
    flex-shrink: 0;
}

.header-content h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.header-content p {
    font-size: 0.8rem;
    opacity: 0.85;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--white);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.25);
}

/* ===== Chat Container ===== */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    scroll-behavior: smooth;
    background: var(--bg);
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ===== Welcome Message ===== */
.welcome-message {
    text-align: center;
    padding: 40px 20px 20px;
}

.welcome-message h2 {
    font-size: 1.6rem;
    color: var(--green);
    margin-bottom: 8px;
}

.welcome-message p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.suggestion-chip {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.suggestion-chip:hover {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green-dark);
}

/* ===== Messages ===== */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    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: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--green-light);
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-user .message-content {
    background: var(--user-bg);
    border-bottom-right-radius: 4px;
    color: var(--text);
}

.message-assistant .message-content {
    background: var(--white);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.message-error .message-content {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-bottom-left-radius: 4px;
}

.message-content a {
    color: var(--green);
    text-decoration: underline;
}

.message-content a:hover {
    color: var(--green-dark);
}

/* ===== Input Area ===== */
.input-container {
    flex-shrink: 0;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-form textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    min-height: 48px;
    max-height: 150px;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.chat-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(74,124,89,0.1);
}

.chat-form textarea:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

.btn-send {
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    min-width: 80px;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-send:hover {
    background: var(--green-dark);
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 10px;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 600px) {
    .app-header {
        padding: 12px 16px;
    }

    .header-content h1 {
        font-size: 1rem;
    }

    .chat-container {
        padding: 12px 16px;
    }

    .message-content {
        max-width: 85%;
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .input-container {
        padding: 12px 16px;
    }

    .welcome-message {
        padding: 20px 10px;
    }

    .welcome-message h2 {
        font-size: 1.3rem;
    }

    .suggestion-chip {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .btn-send {
        padding: 10px 18px;
        min-width: 60px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .chat-form textarea {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

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