/* ═══════════════════════════════════════════════
   PEMEX — chat funnel con video
   ═══════════════════════════════════════════════ */

*,
::after,
::before {
    box-sizing: border-box;
    border: 0 solid #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: Outfit, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    line-height: inherit;
    font-weight: 400;
}

h1,
h4,
p {
    margin: 0;
}

h1,
h4 {
    font-size: inherit;
    font-weight: inherit;
}

a {
    color: inherit;
    text-decoration: inherit;
    cursor: pointer;
}

button,
input {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button {
    text-transform: none;
    cursor: pointer;
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
    border-radius: 80px;
}

input::placeholder {
    opacity: 1;
    color: #6d6d6d;
}

img {
    display: block;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none;
}

/* ----- Utilidades ----- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: .5rem; }
.w-10 { width: 2.5rem; }
.w-full { width: 100%; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.bg-white { background-color: #fff; }
.pb-2 { padding-bottom: .5rem; padding-top: .5rem; }
.pl-1 { padding-left: .25rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-center { text-align: center; }
.hide { display: none; }

/* ----- Layout ----- */
.main-bg {
    background: url(../img/bg.webp) center center / cover no-repeat;
    height: 100vh;
    height: 100dvh;
}

.pattern-bg {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.header {
    width: 40%;
    margin: 0 auto;
    border-bottom: 1px solid #a4a39e;
    border-radius: 25px 25px 0 0;
}

.logo_img {
    border-radius: 50%;
    background: #eceaea;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin-right: 12px;
}

.online {
    color: #898989;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: -.024px;
}

.main-chat {
    background-color: #00000026;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    width: 40%;
    padding: 0 16px 30px;
    overflow-y: scroll;
    margin: 0 auto;
    flex-grow: 1;
    scroll-behavior: smooth;
}

.main-chat .chat_content {
    overflow-y: scroll;
    scroll-behavior: smooth;
}

.date {
    width: fit-content;
    margin: 10px auto;
    padding: 5px 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .2);
    color: #5c5e62;
    text-align: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.warn_content {
    font-size: 13px;
    line-height: 15px;
    background: #dffaff;
    color: #618195;
    text-align: center;
    border-radius: 25px;
    padding: 12px;
}

.warn_content img {
    display: inline-block;
    float: left;
}

/* ----- Mensajes ----- */
.left-chat,
.right-chat {
    width: 100%;
    display: flex;
    align-items: center;
    margin-top: 10px;
    justify-content: left;
}

.left-chat {
    padding-left: 8px;
    position: relative;
    margin-bottom: 2px;
    padding-right: 20px;
}

.left-chat .chat-block {
    width: max-content;
    max-width: 100%;
    display: flex;
    line-height: 1.2;
    flex-direction: column;
    padding: 16px;
    border-radius: 25px 25px 25px 0;
    background: #f9f9f9;
    position: relative;
    box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, .1);
}

.left-chat .chat-block:after {
    position: absolute;
    bottom: 6px;
    right: 12px;
    color: #a7a7a7;
    text-align: right;
    font-size: 12px;
}

.right-chat {
    justify-content: right;
    flex-direction: row-reverse;
    position: relative;
}

.right-chat .chat-block {
    border-radius: 25px 25px 0;
    background: red;
    color: #fff;
    padding: 8px 15px;
    position: relative;
    max-width: 84%;
    box-shadow: -1px 1px 1px 0 rgba(0, 0, 0, .1);
}

.vertical {
    display: flex;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    padding-left: 8px;
    justify-content: left;
    flex-direction: column;
}

.answer-btn {
    background: #fff;
    padding: 12px 8px;
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    border: 1px solid red;
    border-radius: 12px;
}

.answer-btn:hover {
    border: 2px solid red;
}

.vertical .answer-btn {
    margin-bottom: 6px;
}

.active-btn {
    background: red;
    color: #fff;
}

.chelik {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chelik img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.chelik p {
    flex: 1 1 0;
    min-width: 0;
}

.into_imgs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.into_imgs img {
    height: 40px;
    border-radius: 8px;
}

/* ----- Video ----- */
.video_container {
    max-width: 400px;
    position: relative;
    cursor: pointer;
}

.chat-block video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    display: block;
}

.play_btn {
    width: max(40%, 80px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #000000a9;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play_btn::before {
    content: '';
    width: 60%;
    margin-left: 10%;
    aspect-ratio: 1 / 1;
    display: block;
    background: #fff;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ----- Testimonio verificado ----- */
.unified-user-report {
    background: linear-gradient(135deg, #fff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.unified-user-report::before {
    content: "👤 TESTIMONIO DE USUARIO VERIFICADO";
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.user-profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #10b981;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
}

.user-info { flex: 1; }

.user-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified-badge {
    background: #dcfdf7;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.user-title {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.user-comments { margin-bottom: 20px; }

.comment-item {
    background: rgba(16, 185, 129, .05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #10b981;
}

.evidence-section {
    background: rgba(59, 130, 246, .05);
    border: 2px dashed #93c5fd;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.evidence-section::before {
    content: "📱 EVIDENCIA BANCARIA";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3px;
}

.evidence-section img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    border: 1px solid #e2e8f0;
    margin: 10px auto 0;
    max-width: 200px;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.stat-card {
    background: linear-gradient(135deg, #fff, #f9fafb);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
    transition: transform .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    margin: 0 0 4px;
}

.stat-label {
    font-size: 10px;
    color: #6b7280;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    color: #64748b;
}

.timestamp::before {
    content: "🕐 Reportado:";
    font-weight: 600;
}

.verification-status {
    background: #059669;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
}

.verification-status::before {
    content: "✓ VERIFICADO POR PEMEX";
}

/* ----- Footer (barra de mensaje) ----- */
footer {
    bottom: 0;
    left: 0;
    width: 40%;
    padding: 10px;
    margin: 0 auto;
    border-top: 1px solid #e0e0e0;
    background-color: #f7f7f7;
    display: flex;
    align-items: center;
    border-radius: 0 0 20px 20px;
}

.mess_inp_container {
    position: relative;
    flex: 1;
    margin: 0 10px;
}

.message-input {
    width: 100%;
    padding: 4px 60px 4px 35px;
    border: none;
    border-radius: 20px;
    outline: 0;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
    font-size: 14px;
    box-sizing: border-box;
    height: 40px;
}

.attach-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 30px;
    font-weight: 100;
    padding: 0 10px;
    outline: 0;
    color: #888;
    transition: color .2s;
    line-height: 1;
}

.attach-btn img { width: 24px; }
.attach-btn:hover { color: #000; }

.attach-file,
.send_btn,
.smile-btn {
    position: absolute;
    right: 7px;
    top: 8px;
    padding: 0;
}

.attach-file { right: 37px; }
.smile-btn { left: 2px; }

/* ═══════════════════════════════════════════════
   FORMULARIO (backend propio) — tema rojo Pemex
   ═══════════════════════════════════════════════ */
.form {
    padding: 24px;
    width: 100%;
    margin: 20px auto 0;
    max-width: 480px;
    border-radius: 25px;
    border: 1px solid #dd1860;
    background: red;
    box-shadow: 0 1px 0 0 #0000001f;
    color: #fff;
}

.form-title {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.form h4 {
    text-align: left;
    margin-bottom: 13px;
    font-size: 23px;
    line-height: 27px;
    font-weight: 700;
    font-style: normal;
}

.form_description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form_description .font-bold {
    font-weight: 700;
    font-size: 1.1rem;
}

.form_description .underline {
    text-decoration: underline;
    font-size: 1rem;
}

.nachat {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
    color: #fff;
}

.form-container,
.formwrap-outer,
.formwrap,
.intgrtn-form-signup,
.intgrtn-steps-holder {
    width: 100%;
}

.intgrtn-input-holder {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

.intgrtn-step {
    width: 100%;
}

.intgrtn-input-holder label.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.intgrtn-input {
    margin: 5px 0;
    padding: 12px 16px;
    width: 100%;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 2;
    text-align: left;
    border: 1px solid #ffffff99;
    background-color: rgba(255, 255, 255, .946);
    color: #000;
    outline: none;
    transition: border .2s;
    font-family: inherit;
}

.intgrtn-input::placeholder {
    color: grey;
    opacity: 1;
}

.intgrtn-input:focus {
    border-color: #fff;
}

.intgrtn-input-holder.valid .intgrtn-input,
.intgrtn-input.allokinput {
    border-color: #10b981 !important;
}

.intgrtn-input-holder.invalid .intgrtn-input,
.intgrtn-input.errorinput {
    border: 2px solid #ffd1d1 !important;
}

.input-status-check,
.input-status-error {
    position: absolute;
    right: 14px;
    top: 5px;
    display: none;
    align-items: center;
    justify-content: center;
    height: 58px;
    pointer-events: none;
}

.intgrtn-input-holder.valid .input-status-check { display: flex; }
.intgrtn-input-holder.invalid .input-status-error { display: flex; }

.input-status-check svg { stroke: #10b981; }
.input-status-error svg { stroke: #ffd1d1; }

.intgrtn-input-message-error {
    display: none;
    color: #fff;
    font-size: 12px;
    margin: 0 0 6px 6px;
    line-height: 1.4;
    font-weight: 500;
}

.intgrtn-btn-submit-holder {
    margin-top: 8px;
    text-align: center;
}

.intgrtn-btn-submit {
    margin-top: 20px;
    padding: 10px 40px;
    width: 100%;
    background: #fff;
    border: none;
    border-radius: 555px;
    color: red;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: .3s ease-in-out;
    transform: scale(1);
}

.intgrtn-btn-submit:hover {
    transition: .3s ease-in-out;
    transform: scale(1.05);
    box-shadow: 0 1px 4px 0 #00000040;
    background: linear-gradient(180deg, #fff 0, #eed1d7 100%);
}

.intgrtn-btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.invalid-phone-error,
#general-error-message {
    color: #fff !important;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
}

/* intl-tel-input */
.iti { width: 100%; display: block; }
.iti .intgrtn-input { padding-left: 90px !important; }
.iti__country-list {
    color: #000;
    background: #fff !important;
}
.iti__country.iti__highlight,
.iti__country:hover {
    background: #f1f1f1 !important;
}
.iti__country-name,
.iti__dial-code,
.iti__selected-dial-code { color: #000; }
.iti__selected-flag { background: transparent !important; }

/* Autocompletado de email */
#presentation {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: -4px;
    margin-bottom: 8px;
    overflow: hidden;
    color: #000;
}
#presentation .mail-ext {
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}
#presentation .mail-ext:hover {
    background: #f1f1f1;
}

/* ----- Responsive ----- */
@media screen and (max-width: 767px) {
    .main-chat,
    .header,
    footer {
        width: 100%;
    }

    .header,
    footer {
        border-radius: 0;
    }

    .form-title {
        flex-direction: column;
        gap: 12px;
    }

    .form h4 {
        text-align: center;
        margin-bottom: 0;
    }
}

@media (min-width: 767px) {
    .pattern-bg {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .unified-user-report {
        padding: 15px;
        margin: 10px 0;
    }

    .user-profile-section {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .performance-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .evidence-section img {
        max-width: 150px;
    }
}

/* ═══════════════════════════════════════════════
   OVERLAY + LOADER DE ENVÍO (pantalla de operadora)
   ═══════════════════════════════════════════════ */
#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 9998;
}

#submit-loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    color: #1f2937;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ql-card {
    max-width: 430px;
    margin: 0 auto;
    padding: 32px 22px 28px;
    text-align: center;
}

.ql-title {
    margin: 0 0 22px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
    color: #1f2937;
}

.ql-queue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    margin: 0 auto 22px;
    background: #f9f9f9;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}

.ql-queue__num {
    font-size: 26px;
    font-weight: 800;
    color: red;
    line-height: 1;
}

.ql-queue__label {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.ql-text {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #5c5e62;
}

.ql-badge {
    display: inline-block;
    padding: 12px 22px;
    margin: 6px auto 24px;
    background: rgba(16, 185, 129, .12);
    color: #059669;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.ql-badge__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: #10b981;
    vertical-align: middle;
}

.ql-photo img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
}

@media (max-width: 767px) {
    .ql-card {
        padding: 24px 16px 24px;
    }

    .ql-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .ql-queue {
        margin-bottom: 16px;
    }

    .ql-text {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .ql-badge {
        margin: 4px auto 16px;
    }

    .ql-photo img {
        max-height: 48vh;
        object-fit: cover;
        object-position: top center;
    }
}

.loading-wrapper { display: none; }
