/* ============================================================
   Limpiacity Consulta – Frontend Styles
   ============================================================ */

:root {
    --lc-primary:        #00B4C5;
    --lc-primary-dark:   #009AAB;
    --lc-primary-light:  rgba(0,180,197,.12);
    --lc-text:           #2d3748;
    --lc-text-muted:     #718096;
    --lc-border:         #e2e8f0;
    --lc-header-bg:      #4a5568;
    --lc-card-bg:        #ffffff;
    --lc-error:          #e53e3e;
    --lc-error-bg:       #fff5f5;
    --lc-error-border:   #feb2b2;
    --lc-success:        #38a169;
    --lc-radius:         12px;
    --lc-radius-sm:      8px;
}

/* ── Reset de box-sizing dentro del plugin ── */
.lc-wrapper,
.lc-wrapper *,
.lc-wrapper *::before,
.lc-wrapper *::after {
    box-sizing: border-box;
}

/* ── Wrapper base — sin overflow ni border-radius que recorten ── */
.lc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    color: var(--lc-text);
    line-height: 1.5;
    width: 100%;
}

/* ============================================================
   Layout SPLIT (con imagen lateral)
   ============================================================ */
.lc-split {
    display: flex;
    min-height: 580px;
    border-radius: var(--lc-radius);
    overflow: hidden;            /* sólo el split recorta, no el wrapper general */
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
}

.lc-split .lc-left-panel {
    flex: 0 0 52%;
    display: flex;
    flex-direction: column;
    background: #f7f9fc;
}

.lc-split .lc-right-panel {
    flex: 0 0 48%;
    overflow: hidden;
}

.lc-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Split: header oscuro */
.lc-split .lc-header {
    background: var(--lc-header-bg);
    padding: 26px 32px;
    flex-shrink: 0;
}

/* Split: área de contenido con fondo que llena todo */
.lc-split .lc-content-area {
    flex: 1;
    background: #f7f9fc;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* En split la tarjeta llena el panel izquierdo */
.lc-split .lc-card {
    flex: 1;
    max-width: 100%;
}

/* ============================================================
   Layout CARD (sin imagen — modo simple / tarjeta centrada)
   ============================================================ */
.lc-wrapper:not(.lc-split) .lc-header {
    background: var(--lc-header-bg);
    padding: 22px 28px;
    border-radius: var(--lc-radius) var(--lc-radius) 0 0;
}

.lc-wrapper:not(.lc-split) .lc-left-panel {
    display: flex;
    flex-direction: column;
}

.lc-wrapper:not(.lc-split) .lc-content-area {
    background: transparent;     /* sin fondo extra — usa el fondo de la página */
    padding: 24px 0 0 0;
    display: flex;
    flex-direction: column;
}

/* En modo card la tarjeta ocupa todo el ancho disponible */
.lc-wrapper:not(.lc-split) .lc-card {
    max-width: 100%;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

/* ============================================================
   Título del header
   ============================================================ */
.lc-page-title {
    color: #ffffff;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.lc-page-title span {
    color: var(--lc-primary);
}

/* ============================================================
   Tarjeta
   ============================================================ */
.lc-card {
    background: var(--lc-card-bg);
    border: 2px solid var(--lc-primary);
    border-radius: var(--lc-radius);
    padding: 28px 28px 24px;
    width: 100%;
    animation: lc-fade-in .22s ease;
}

.lc-results-card {
    max-width: 100% !important;
}

@keyframes lc-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Título de la tarjeta ── */
.lc-card-title {
    color: var(--lc-primary);
    font-size: 19px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 12px;
}

/* ── Descripción ── */
.lc-card-desc {
    color: var(--lc-text-muted);
    font-size: 13.5px;
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.6;
}

.lc-card-desc strong {
    color: var(--lc-text);
}

/* ============================================================
   Tabs — pastillas pill inmunes al tema
   ============================================================ */
.lc-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    background: #eef1f5;
    border-radius: 10px;
    padding: 4px;
    width: 100%;
}

.lc-tab {
    /* !important para neutralizar cualquier estilo del tema */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex: 1 1 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 7px !important;
    color: var(--lc-text-muted) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.2 !important;
    transition: background .18s, color .18s, box-shadow .18s !important;
    user-select: none;
    white-space: nowrap;
}

.lc-tab svg {
    flex-shrink: 0;
    opacity: .7;
}

.lc-tab:hover {
    color: var(--lc-primary) !important;
    background: rgba(0,180,197,.1) !important;
}

.lc-tab.active {
    background: #ffffff !important;
    color: var(--lc-primary-dark) !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 5px rgba(0,0,0,.12) !important;
}

.lc-tab.active svg {
    opacity: 1;
}

/* ============================================================
   Campos del formulario
   ============================================================ */
.lc-form-group {
    margin-bottom: 18px;
}

.lc-label,
.lc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--lc-text);
    margin-bottom: 7px;
}

.lc-input,
.lc-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--lc-text);
    background: #ffffff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    display: block;
    margin: 0;
}

.lc-input:focus,
.lc-textarea:focus {
    border-color: var(--lc-primary);
    box-shadow: 0 0 0 3px var(--lc-primary-light);
}

.lc-textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.6;
}

/* ============================================================
   Botones principales
   ============================================================ */
.lc-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: var(--lc-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--lc-radius-sm) !important;
    padding: 11px 26px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background .2s, transform .1s !important;
    line-height: 1 !important;
}

.lc-btn-primary:hover {
    background: var(--lc-primary-dark) !important;
    color: #fff !important;
}

.lc-btn-primary:active {
    transform: scale(.98) !important;
}

.lc-btn-primary:disabled {
    opacity: .6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.lc-btn-sm {
    padding: 8px 18px !important;
    font-size: 13px !important;
}

/* ── Botón de volver (span/link) ── */
.lc-btn-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: transparent !important;
    border: none !important;
    color: var(--lc-primary) !important;
    font-size: 13px !important;
    font-family: inherit !important;
    cursor: pointer !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    transition: background .15s, color .15s !important;
}

.lc-btn-link:hover {
    background: var(--lc-primary-light) !important;
    color: var(--lc-primary-dark) !important;
    text-decoration: none !important;
}

/* ============================================================
   Alerta
   ============================================================ */
.lc-alert {
    padding: 10px 14px;
    border-radius: var(--lc-radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.lc-alert.error {
    background: var(--lc-error-bg);
    border: 1px solid var(--lc-error-border);
    color: var(--lc-error);
}

.lc-alert.info {
    background: var(--lc-primary-light);
    border: 1px solid rgba(0,180,197,.3);
    color: var(--lc-primary-dark);
}

/* ============================================================
   Resultados
   ============================================================ */
.lc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--lc-border);
}

.lc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
    font-size: 13.5px;
}

.lc-results-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.lc-results-table tbody tr:last-child {
    border-bottom: none;
}

.lc-results-table tbody tr:hover {
    background: #fafbfd;
}

.lc-results-table td {
    padding: 9px 6px;
    vertical-align: top;
}

.lc-results-table td:first-child {
    color: var(--lc-text-muted);
    font-weight: 500;
    width: 40%;
    padding-right: 14px;
    font-size: 13px;
}

.lc-results-table td:last-child {
    color: var(--lc-text);
    font-weight: 600;
    word-break: break-word;
}

.lc-results-table .lc-empty {
    color: #c0c8d4;
    font-style: italic;
    font-weight: 400;
}

/* ============================================================
   Sección Motivo (editable)
   ============================================================ */
.lc-motivo-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 2px dashed rgba(0,180,197,.4);
}

.lc-motivo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--lc-primary-light);
    color: var(--lc-primary-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.lc-motivo-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.lc-save-feedback {
    font-size: 13px;
    font-weight: 600;
}

.lc-save-feedback.success { color: var(--lc-success); }
.lc-save-feedback.error   { color: var(--lc-error); }

/* ============================================================
   Spinner de carga
   ============================================================ */
.lc-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lc-spin .6s linear infinite;
    flex-shrink: 0;
}

@keyframes lc-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
    .lc-split {
        flex-direction: column;
    }

    .lc-split .lc-left-panel {
        flex: 1 1 auto;
    }

    .lc-right-panel {
        display: none !important;
    }
}

@media (max-width: 520px) {
    .lc-split .lc-header,
    .lc-wrapper:not(.lc-split) .lc-header {
        padding: 18px 18px;
    }

    .lc-split .lc-content-area {
        padding: 18px 16px;
    }

    .lc-card {
        padding: 20px 16px 18px;
    }

    .lc-page-title {
        font-size: 20px;
    }

    .lc-results-table td:first-child {
        width: 45%;
    }
}
