/* ============================= */
/* Reset básico de elementos */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

/* ============================= */
/* Header / Navbar */
/* ============================= */
header {
    width: 100%;
    height: 60px;
    background-color: #1f2937;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.4rem;
    font-weight: 700;
}

header .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

header .status {
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #4caf50;
    color: #fff;
    font-weight: 600;
}

header button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: #ef4444;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

header button:hover {
    background-color: #dc2626;
}

/* ============================= */
/* Main chat container */
/* ============================= */
.chat-container {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    height: calc(100vh - 100px);
}

/* Chat principal */
.chat-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Chat header */
.chat-header {
    background-color: #111827;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    font-weight: 600;
    font-size: 1rem;
}

/* Chat messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    background-color: #f9fafb;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mensajes */
.message {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Mensajes enviados */
.message.sent {
    align-self: flex-end;
    background-color: #2563eb;
    color: #fff;
    border-bottom-right-radius: 0;
}

/* Mensajes recibidos */
.message.received {
    align-self: flex-start;
    background-color: #e5e7eb;
    color: #111827;
    border-bottom-left-radius: 0;
}

/* Contenido y metadatos del mensaje */
.message-content {
    display: block;
    margin-bottom: 4px;
}

.message-meta {
    font-size: 0.75rem;
    color: rgba(0,0,0,0.5);
    text-align: right;
}

/* ============================= */
/* Chat input */
/* ============================= */
.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #d1d5db;
    background-color: #f3f4f6;
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

.chat-input button {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background-color: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-input button:hover {
    background-color: #1e40af;
}

/* ============================= */
/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #9ca3af;
    border-radius: 4px;
}

/* ============================= */
/* Footer */
footer {
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}
