/* =========================================================
   Libro de Reclamaciones Perú v5.1 — Rediseño visual
   Solo cambios CSS/JS visuales. Funcionalidad intacta.
   ========================================================= */

#lrp-wrapper, #lrp-wrapper * {
    box-sizing: border-box;
}

#lrp-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #111;
}

/* ── TEXTO INTRODUCTORIO ─────────────────────────── */
#lrp-wrapper .lrp-intro {
    margin-bottom: 28px;
}
#lrp-wrapper .lrp-intro p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* ── HEADER COMERCIO ─────────────────────────────── */
#lrp-wrapper .lrp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ebebeb;
    flex-wrap: wrap;
}
#lrp-wrapper .lrp-header-minimal {
    justify-content: flex-start;
}
#lrp-wrapper .lrp-header-logo {
    max-height: 48px;
    max-width: 140px;
    object-fit: contain;
    flex-shrink: 0;
}
#lrp-wrapper .lrp-header-info {
    flex: 1;
    min-width: 160px;
}
#lrp-wrapper .lrp-header-nombre {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}
#lrp-wrapper .lrp-header-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#lrp-wrapper .lrp-header-badge {
    margin-left: auto;
    text-align: right;
}
#lrp-wrapper .lrp-header-badge-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .4px;
    color: #111;
}
#lrp-wrapper .lrp-header-badge-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

/* ── SECCIONES — solo título bold, sin card header ── */
#lrp-wrapper .lrp-section {
    margin-bottom: 32px;
}
#lrp-wrapper .lrp-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 18px;
    padding: 0;
    border: none;
    background: none;
}

/* ── GRID ────────────────────────────────────────── */
#lrp-wrapper .lrp-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
#lrp-wrapper .lrp-row:last-child { margin-bottom: 0; }
#lrp-wrapper .lrp-field { display: flex; flex-direction: column; }
#lrp-wrapper .lrp-col-full  { flex: 1 1 100%; }
#lrp-wrapper .lrp-col-half  { flex: 1 1 calc(50% - 6px); min-width: 140px; }
#lrp-wrapper .lrp-col-third { flex: 1 1 calc(33% - 8px); min-width: 120px; }
#lrp-wrapper .lrp-col-grow  { flex: 1 1 auto; }

/* ── LABELS ──────────────────────────────────────── */
#lrp-wrapper .lrp-label {
    font-size: 11px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: .5px;
}
#lrp-wrapper .lrp-optional {
    font-weight: 400;
    color: #bbb;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
}
#lrp-wrapper .lrp-req { color: #c00; }

/* ── INPUTS ──────────────────────────────────────── */
#lrp-wrapper .lrp-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    background: transparent;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
#lrp-wrapper .lrp-input::placeholder { color: #bbb; font-size: 13px; }
#lrp-wrapper .lrp-input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
#lrp-wrapper .lrp-input.lrp-error {
    border-color: #e00;
    box-shadow: 0 0 0 3px rgba(220,0,0,.06);
}
#lrp-wrapper .lrp-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}
#lrp-wrapper .lrp-charcount {
    font-size: 11px;
    color: #ccc;
    text-align: right;
    margin-top: 4px;
}

/* ── INPUT UNIFICADO: TIPO DOC + N° DOC ──────────── */
#lrp-wrapper .lrp-doc-combo {
    display: flex;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
    background: transparent;
}
#lrp-wrapper .lrp-doc-combo:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
#lrp-wrapper .lrp-doc-combo.lrp-error {
    border-color: #e00;
}
#lrp-wrapper .lrp-doc-combo select {
    border: none;
    border-right: 1.5px solid #d0d0d0;
    border-radius: 0;
    padding: 11px 10px 11px 14px;
    font-size: 13px;
    font-family: inherit;
    color: #111;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    width: 90px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 22px;
}
#lrp-wrapper .lrp-doc-combo input {
    border: none;
    border-radius: 0;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    background: transparent;
    outline: none;
    flex: 1;
    min-width: 0;
}
#lrp-wrapper .lrp-doc-combo input::placeholder { color: #bbb; font-size: 13px; }

/* ── PILLS ───────────────────────────────────────── */
#lrp-wrapper .lrp-pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
#lrp-wrapper .lrp-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border: 1.5px solid #d0d0d0;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background: transparent;
    transition: all .15s;
    user-select: none;
}
#lrp-wrapper .lrp-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}
#lrp-wrapper .lrp-pill:hover {
    border-color: #999;
    color: #111;
}
#lrp-wrapper .lrp-pill.lrp-pill-selected {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

/* ── CARDS RECLAMO / QUEJA ───────────────────────── */
#lrp-wrapper .lrp-tipo-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
#lrp-wrapper .lrp-tipo-opt {
    flex: 1;
    min-width: 180px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    transition: border-color .15s, background .15s;
    position: relative;
}
#lrp-wrapper .lrp-tipo-opt:hover {
    border-color: #999;
    background: #fafafa;
}
#lrp-wrapper .lrp-tipo-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}
#lrp-wrapper .lrp-tipo-opt-inner {
    padding: 14px 16px 14px 40px;
    position: relative;
}
/* Círculo radio visual */
#lrp-wrapper .lrp-tipo-opt-inner::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s;
}
#lrp-wrapper .lrp-tipo-opt.lrp-selected .lrp-tipo-opt-inner::before {
    border-color: #111;
    border-width: 5px;
}
#lrp-wrapper .lrp-tipo-opt-tag {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
}
#lrp-wrapper .lrp-tipo-opt-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}
#lrp-wrapper .lrp-tipo-opt.lrp-selected {
    border-color: #111;
    background: #f7f7f7;
}

/* ── TUTOR BOX ───────────────────────────────────── */
#lrp-wrapper .lrp-tutor-box {
    background: #fafafa;
    border: 1.5px dashed #d0d0d0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 10px;
}
#lrp-wrapper .lrp-tutor-title {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── SEPARADOR ENTRE SECCIONES ───────────────────── */
#lrp-wrapper .lrp-divider {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 28px 0;
}

/* ── LEGAL ───────────────────────────────────────── */
#lrp-wrapper .lrp-legal-notices {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
#lrp-wrapper .lrp-legal-notice {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #777;
    line-height: 1.5;
}
#lrp-wrapper .lrp-legal-icon {
    flex-shrink: 0;
    color: #bbb;
    font-size: 13px;
    margin-top: 1px;
}
#lrp-wrapper .lrp-declaracion {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #ebebeb;
    border-radius: 8px;
}
#lrp-wrapper .lrp-declaracion input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: auto;
    height: auto;
    accent-color: #111;
}
#lrp-wrapper .lrp-declaracion a { color: #111; font-weight: 600; }

/* ── OBSERVACIONES ───────────────────────────────── */
#lrp-wrapper .lrp-observaciones {
    background: #fafafa;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
#lrp-wrapper .lrp-observaciones-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    margin-bottom: 6px;
}
#lrp-wrapper .lrp-observaciones p {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ── BOTÓN SUBMIT ────────────────────────────────── */
#lrp-wrapper .lrp-submit-area {
    margin-top: 24px;
    text-align: center;
}
#lrp-wrapper #lrp-submit-btn,
#lrp-wrapper .lrp-btn-submit,
div#lrp-wrapper button#lrp-submit-btn {
    display: inline-block !important;
    background: #111111 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    min-width: 260px !important;
    letter-spacing: .2px !important;
    transition: background .2s !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.15) !important;
    text-transform: none !important;
    text-decoration: none !important;
    line-height: normal !important;
}
#lrp-wrapper #lrp-submit-btn:hover,
#lrp-wrapper .lrp-btn-submit:hover {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}
#lrp-wrapper #lrp-submit-btn:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
}

/* ── ERROR ───────────────────────────────────────── */
#lrp-wrapper .lrp-error-msg {
    margin-top: 12px;
    padding: 10px 16px;
    background: #fff5f5;
    border: 1px solid #fcc;
    color: #c00;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

/* ── MODAL ───────────────────────────────────────── */
.lrp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99990;
    backdrop-filter: blur(3px);
}
.lrp-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    width: 92%;
    max-width: 420px;
    z-index: 99999;
    box-shadow: 0 24px 60px rgba(0,0,0,.18);
    text-align: center;
}
.lrp-modal-check {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.lrp-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111;
}
.lrp-modal-sub {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}
.lrp-modal-data {
    background: #f7f7f7;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: left;
}
.lrp-modal-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}
.lrp-modal-row:last-child { border: none; }
.lrp-modal-label { color: #777; }
.lrp-modal-val   { font-weight: 700; color: #111; }
.lrp-modal-corr  { font-size: 15px; letter-spacing: 1px; }
.lrp-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.lrp-btn-print {
    padding: 11px 22px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
}
.lrp-btn-print:hover { background: #333; }
.lrp-btn-close {
    padding: 11px 22px;
    background: transparent;
    color: #555;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
}
.lrp-btn-close:hover { background: #f5f5f5; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 560px) {
    #lrp-wrapper .lrp-col-half,
    #lrp-wrapper .lrp-col-third { flex: 1 1 100%; }
    #lrp-wrapper .lrp-tipo-opt  { min-width: 100%; }
    #lrp-wrapper .lrp-header    { flex-direction: column; align-items: flex-start; }
    #lrp-wrapper .lrp-header-badge { margin-left: 0; text-align: left; }
    #lrp-wrapper #lrp-submit-btn,
    #lrp-wrapper .lrp-btn-submit { min-width: 100% !important; width: 100% !important; }
}
