/* ============================================================
   GPT MUNICIPAL – ESTILO MAQUETA MODERNA (CREMA)
   Este CSS reemplaza por completo cualquier estilo anterior.
============================================================ */

/* CONTENEDOR PRINCIPAL */
.gpt-mun-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    background: #f6f4f0;
    border-radius: 24px;
    font-family: "Inter", sans-serif;
	min-height: 85vh;
    max-height: 90vh;        /* Nunca sobrepasa el 90% */
    overflow-y: auto;        /* Activa scroll si se llena */
    overflow-x: hidden;      /* Evita scroll lateral */
}

/* HEADER */
.gpt-mun-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.gpt-mun-header {
    text-align: center;
    margin: 0 auto;
}

.gpt-mun-header h1 {
    margin: 0 0 8px;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.gpt-mun-header p {
    margin: 0;
    font-size: 22px;
}

/* BOTÓN SALIR */
.gpt-mun-logout-form button {
    background: transparent;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
}

.gpt-mun-logout-form button:hover {
    background: #eee;
}

/* ÁREA DE CONVERSACIÓN */
.gpt-mun-conversation {
    min-height: 180px;
    max-height: 380px;
    overflow-y: auto;
    padding: 10px 5px 30px;
}

.gpt-mun-msg {
    display: block;
    margin-bottom: 16px;
}

/* MENSAJE DEL USUARIO (derecha) */
.gpt-mun-msg-user {
	display: flex !important;
    justify-content: flex-end !important;
	text-align: right;
}

.gpt-mun-bubble-user {
    background: #a9afb6;
    color: #fff;
    border-radius: 26px;
    border-top-right-radius: 6px;
    padding: 14px 18px;
    max-width: 70%;
    font-size: 18px;
    line-height: 1.4;
	margin-left: auto !important;
}

/* MENSAJE DEL BOT (izquierda) */
.gpt-mun-msg-bot {
    justify-content: flex-start;
	text-align: left;
}

.gpt-mun-bubble-bot {
    background: transparent;
    color: #333;
    padding: 0;
    border-radius: 0;
    max-width: 80%;
    font-size: 18px;
    line-height: 1.5;
}

/* ACCIONES DE RESPUESTA DEL BOT */
.gpt-mun-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

.gpt-mun-actions button {
    border-radius: 999px;
    border: 1px solid #444;
    padding: 6px 12px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.gpt-mun-actions button:hover {
    background: #eee;
}

/* TÍTULO DE SUGERENCIAS */
.gpt-mun-suggestions-title {
    margin-top: 20px;
    text-align: center;
    font-size: 16px;
}

.gpt-mun-suggestions-title strong {
    font-weight: 700;
}

/* INPUT: barra redondeada */
.gpt-mun-input-row {
    margin: 12px auto 10px;
    max-width: 650px;
    display: flex;
    align-items: center;
    border-radius: 40px;
    border: 1px solid #333;
    background: #fff;
    overflow: hidden;
}

.gpt-mun-input-row input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    outline: none;
}

.gpt-mun-input-row button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 22px;
    background: #2f2f2f;
    color: #f75a36;
    display: flex;
    align-items: center;
    justify-content: center;
	margin: 5px;
}

/* DISCLAIMER */
.gpt-mun-disclaimer {
    text-align: center;
    font-size: 13px;
    margin-top: 8px;
}

.gpt-mun-disclaimer strong {
    font-weight: 700;
}

/* FORMULARIO DE REGISTRO – MATCH MAQUETA */
.gpt-mun-register-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid #ddd;
    background: #f6f4f0;
}

.gpt-mun-register-wrapper h2 {
    text-align: center;
    font-size: 34px;
    margin-bottom: 10px;
    font-weight: 700;
}

.gpt-mun-register-wrapper p {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.gpt-mun-register-wrapper input[type="text"],
.gpt-mun-register-wrapper input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 2px solid #e74c3c;
    border-radius: 6px;
    font-size: 16px;
}

.gpt-mun-register-wrapper button {
    width: 100%;
    padding: 16px;
    background: #e74c3c;
    color: #fff;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.gpt-mun-register-wrapper button:hover {
    opacity: 0.85;
}

/* RESPONSIVE */
@media (max-width:768px){
    .gpt-mun-shell { padding: 24px 16px 40px; }
    .gpt-mun-header h1 { font-size: 36px; }
    .gpt-mun-header p { font-size: 18px; }
    .gpt-mun-bubble-user,
    .gpt-mun-bubble-bot { font-size: 16px; max-width: 90%; }
}

/* Quitar borde del input del chatbot */
#gpt-mun-input {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent;
}

/* ============================================================
   MENSAJE DE BIENVENIDA COMO BURBUJA ESPECIAL
============================================================ */

.gpt-mun-welcome-wrapper {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.gpt-mun-welcome-title {
    font-size: 52px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: 0.03em;
    color: #000;
}

.gpt-mun-welcome-sub {
    font-size: 22px;
    margin: 0;
    opacity: 0.9;
    color: #333;
}

/* ============================================================
   FIX: Botones de acciones del chatbot (Copiar, Compartir…)
============================================================ */

.gpt-mun-actions button {
    all: unset !important;            /* borra TODOS los estilos heredados */
    display: inline-block !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    border: 1px solid #444 !important;
    background: #fff !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Hover */
.gpt-mun-actions button:hover {
    background: #eee !important;
}

/* Contenedor horizontal normal */
.gpt-mun-actions {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.gpt-mun-welcome-spacer {
    height: 200px;
}

/* ===================================================================
   ICONOS DE ACCIÓN (Copiar, Compartir, Fuentes, Correo)
=================================================================== */

.gpt-mun-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    align-items: center;
}

.gpt-mun-actions button {
    all: unset !important;
    cursor: pointer !important;
    width: 26px;
    height: 26px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #666;
    background: #fff;
    transition: 0.2s ease;
}

.gpt-mun-actions button:hover {
    background: #eee;
}

.gpt-mun-actions button svg {
    width: 14px;
    height: 14px;
    stroke: #444;
}

.gpt-mun-actions {
    margin-top: 6px;
    margin-left: 4px;
    display: flex;
    gap: 12px;
}

/* ============================================================
   RESPONSIVE – Ajustes para móviles y tablets
============================================================ */

/* Tablets medianos (768px a 991px) */
@media (max-width: 991px) {

    /* Espaciado debajo del mensaje de bienvenida */
    .gpt-mun-welcome-spacer {
        height: 80px;
    }

    /* Títulos */
    .gpt-mun-welcome-title {
        font-size: 40px;
    }
    .gpt-mun-welcome-sub {
        font-size: 18px;
    }

    /* Burbuja */
    .gpt-mun-bubble-user,
    .gpt-mun-bubble-bot {
        font-size: 16px;
        max-width: 90%;
    }

    /* Input */
    .gpt-mun-input-row {
        max-width: 100%;
        border-radius: 32px;
    }

    .gpt-mun-input-row input {
        font-size: 15px;
        padding: 12px 18px;
    }

    .gpt-mun-input-row button {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }

    .gpt-mun-conversation {
        max-height: 340px;
    }
}

/* Móviles (480px a 767px) */
@media (max-width: 767px) {

    /* Espaciado */
    .gpt-mun-welcome-spacer {
        height: 60px;
    }

    /* Títulos */
    .gpt-mun-welcome-title {
        font-size: 32px;
    }
    .gpt-mun-welcome-sub {
        font-size: 16px;
    }

    /* Burbujas */
    .gpt-mun-bubble-user,
    .gpt-mun-bubble-bot {
        font-size: 15px;
        line-height: 1.4;
        max-width: 95%;
    }

    /* Área del chat */
    .gpt-mun-conversation {
        max-height: 300px;
        padding: 10px 2px 20px;
    }

    /* Input */
    .gpt-mun-input-row {
        border-radius: 28px;
    }

    .gpt-mun-input-row input {
        font-size: 14px;
        padding: 10px 16px;
    }

    .gpt-mun-input-row button {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    /* Acciones */
    .gpt-mun-actions button {
        width: 22px;
        height: 22px;
    }

    .gpt-mun-actions button svg {
        width: 12px;
        height: 12px;
    }
}

/* Móviles muy pequeños (menos de 400px) */
@media (max-width: 400px) {

    .gpt-mun-welcome-spacer {
        height: 40px;
    }

    .gpt-mun-welcome-title {
        font-size: 28px;
    }
    .gpt-mun-welcome-sub {
        font-size: 14px;
    }

    .gpt-mun-input-row input {
        font-size: 13px;
        padding: 8px 14px;
    }

    .gpt-mun-input-row button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gpt-mun-conversation {
        max-height: 260px;
    }
}