/* Cloud Fixer Chat shared styles */

.cf-chat-wrapper {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cf-chat-header h2 {
    margin: 0 0 4px;
    font-size: 1.8rem;
    color: #0f172a;
}

.cf-chat-header p {
    margin: 0 0 16px;
    color: #475569;
}

.cf-chat-card {
    background: #f4f0ec;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    padding: 20px 24px 24px;
}

.cf-chat-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.cf-chat-field {
    flex: 1 1 220px;
    min-width: 0;
}

.cf-chat-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.cf-chat-field input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #d4d4d8;
    padding: 10px 14px;
    font-size: 0.95rem;
    background: #f9fafb;
}

.cf-chat-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.cf-btn {
    border-radius: 999px;
    padding: 9px 18px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.05s ease, box-shadow 0.1s ease, background 0.1s ease;
    white-space: nowrap;
}

.cf-btn-primary {
    background: #065f46;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(6, 95, 70, 0.35);
}

.cf-btn-primary:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(6, 95, 70, 0.45);
}

.cf-btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #d4d4d8;
    box-shadow: 0 4px 10px rgba(148, 163, 184, 0.35);
}

.cf-btn-secondary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

.cf-btn-circle {
    border-radius: 999px;
    min-width: 80px;
    padding-inline: 20px;
    background: #047857;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(6, 95, 70, 0.35);
}

.cf-btn-circle:hover {
    background: #059669;
    transform: translateY(-1px);
}

.cf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cf-chat-status {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.cf-chat-messages {
    background: #ffffff;
    border-radius: 16px;
    min-height: 140px;
    max-height: 360px;
    padding: 12px 14px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.cf-chat-empty {
    text-align: center;
    margin: 40px 0;
    color: #9ca3af;
    font-size: 0.9rem;
}

.cf-chat-message-row {
    margin-bottom: 10px;
    display: flex;
}

.cf-chat-message-bubble {
    padding: 8px 11px;
    border-radius: 14px;
    max-width: 80%;
    font-size: 0.9rem;
    line-height: 1.35;
}

.cf-chat-message-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

.cf-chat-message-visitor .cf-chat-message-bubble {
    background: #e5f6ff;
    color: #111827;
    border-bottom-left-radius: 4px;
}

.cf-chat-message-agent {
    justify-content: flex-end;
}

.cf-chat-message-agent .cf-chat-message-bubble {
    background: #047857;
    color: #ecfdf5;
    border-bottom-right-radius: 4px;
}

.cf-chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.cf-chat-input-row textarea {
    flex: 1 1 auto;
    min-height: 70px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid #d4d4d8;
    padding: 10px 12px;
    font-size: 0.95rem;
}

/* Inbox table */

.cf-chat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cf-chat-table th,
.cf-chat-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.cf-chat-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.cf-chat-table tbody tr:hover {
    background: #f9fafb;
}

.cf-chat-ticket-link {
    color: #047857;
    font-weight: 600;
    text-decoration: none;
}

.cf-chat-ticket-link:hover {
    text-decoration: underline;
}

/* Responsive tweaks */

@media (max-width: 768px) {
    .cf-chat-card-header {
        align-items: stretch;
    }

    .cf-chat-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .cf-chat-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cf-btn-circle {
        align-self: flex-end;
    }
}
