/* Ohm AI Assistant — Full Page Chat */

/* Main container */
.ohm-chat {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
}

/* Header bar */
.ohm-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    background: #fff;
}
.ohm-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ohm-chat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #d44800, #c23e00);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.ohm-chat-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}
.ohm-chat-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ohm-quota {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
}
.ohm-new-conv-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s;
}
.ohm-new-conv-btn:hover:not(:disabled) {
    border-color: #c23e00;
    color: #c23e00;
}
.ohm-new-conv-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Messages area */
.ohm-messages {
    flex: 1;
    min-height: 50vh;
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Welcome state */
.ohm-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    padding: 20px 0;
    text-align: center;
    overflow-y: auto;
}
.ohm-welcome-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.ohm-welcome-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d44800, #f15600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.ohm-welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.ohm-welcome-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 28px;
    max-width: 420px;
}

/* Suggestion cards */
.ohm-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 560px;
    width: 100%;
}
.ohm-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ohm-suggestion:hover {
    border-color: #f15600;
    box-shadow: 0 2px 12px rgba(241, 86, 0, 0.1);
    transform: translateY(-1px);
}
.ohm-suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.ohm-suggestion strong {
    display: block;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 1px;
}
.ohm-suggestion small {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.3;
}

/* Message bubbles */
.ohm-msg {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-wrap: break-word;
    animation: ohm-msg-in 0.2s ease-out;
}
@keyframes ohm-msg-in {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
.ohm-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #d44800, #c23e00);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ohm-msg-assistant {
    align-self: flex-start;
    background: #f5f5f5;
    color: #333;
    border-bottom-left-radius: 4px;
}
.ohm-msg-assistant p { margin-bottom: 0.5em; }
.ohm-msg-assistant p:last-child { margin-bottom: 0; }
.ohm-msg-assistant ul, .ohm-msg-assistant ol {
    margin-bottom: 0.5em;
    padding-left: 1.5em;
}
.ohm-msg-assistant code {
    background: #e0e0e0;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.85em;
}
.ohm-msg-assistant strong { font-weight: 600; }
.ohm-msg-assistant a { color: #c23e00; text-decoration: underline; }

/* File attachment indicator in user message */
.ohm-msg-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 4px;
}

/* Status indicator */
.ohm-status {
    align-self: flex-start;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ohm-status .spinner-border {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

/* Error message */
.ohm-msg-error {
    align-self: center;
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid #fecaca;
}

/* Info box (turn limit, etc.) */
.ohm-msg-info {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 0.85rem;
    color: #333;
    align-self: center;
    max-width: 80%;
    text-align: center;
}
.ohm-msg-info p { margin: 0 0 8px 0; }
.ohm-msg-info p:last-child { margin-bottom: 0; }
.ohm-reset-btn {
    display: inline-block;
    background: #f15600;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}
.ohm-reset-btn:hover { background: #d94d00; }
.ohm-credits-link {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
}
.ohm-credits-link:hover { background: #218838; color: #fff; }

/* Credit info bar */
.ohm-credit-bar {
    padding: 6px 20px;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    border-top: 1px solid #f1f1f1;
    flex-shrink: 0;
    background: #fafafa;
}
.ohm-credit-bar i {
    margin-right: 4px;
}
.ohm-credit-bar a {
    color: #c23e00;
    font-weight: 600;
    text-decoration: none;
}
.ohm-credit-bar a:hover {
    text-decoration: underline;
}

/* File preview */
.ohm-file-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 20px;
    background: #faf6f3;
    border-top: 1px solid #eee;
    font-size: 0.78rem;
    color: #666;
    flex-shrink: 0;
}
.ohm-file-preview span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ohm-file-preview button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}
.ohm-file-preview button:hover { color: #c00; }

/* Input area */
.ohm-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    background: #fff;
    align-items: flex-end;
}
.ohm-attach-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}
.ohm-attach-btn:hover { color: #c23e00; }
.ohm-attach-btn.has-file { color: #c23e00; }
#ohm-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.4;
    font-family: inherit;
}
#ohm-input:focus {
    border-color: #c23e00;
    box-shadow: 0 0 0 2px rgba(194, 62, 0, 0.08);
}
.ohm-send-btn {
    background: linear-gradient(135deg, #d44800, #c23e00);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
    transition: opacity 0.15s;
    line-height: 1;
}
.ohm-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ohm-send-btn:hover:not(:disabled) {
    opacity: 0.9;
}

/* Mobile */
@media (max-width: 767px) {
    .ohm-chat {
        max-width: 100%;
    }
    .ohm-messages { padding: 16px; }
    .ohm-suggestions {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .ohm-msg { max-width: 90%; }
    .ohm-welcome h2 { font-size: 1.3rem; }
    .ohm-welcome-sub { font-size: 0.88rem; }
    .ohm-input-area { padding: 10px 12px 12px; }
    .ohm-chat-header { padding: 10px 14px; }
    .ohm-chat-subtitle { display: none; }
}
