/* ─── Duvetex Libro de Reclamaciones — Frontend CSS ─── */

.dtx-libro-container {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
}

/* ─── Header ─── */
.dtx-libro-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #111;
    color: #fff;
    padding: 20px 28px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

.dtx-libro-header__brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    display: block;
}

.dtx-libro-header__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}

.dtx-libro-header__legal {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    line-height: 1.5;
    margin: 0;
}

.dtx-libro-header__company {
    font-size: 11px;
    color: rgba(255,255,255,.8);
    margin: 4px 0 0;
}

/* ─── Avisos ─── */
.dtx-libro-notice {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 0;
}

.dtx-libro-notice--info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.dtx-libro-notice--warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

/* ─── Form ─── */
.dtx-libro-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

/* ─── Sections ─── */
.dtx-libro-section {
    padding: 24px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.dtx-libro-section:last-child {
    border-bottom: none;
}

.dtx-libro-section__title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none !important;
    padding: 0 !important;
}

.dtx-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #111;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.dtx-libro-subsection {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 16px;
    margin-top: 14px;
}

/* ─── Grid rows ─── */
.dtx-libro-row {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.dtx-libro-row:last-child {
    margin-bottom: 0;
}

.dtx-libro-row--1 { grid-template-columns: 1fr; }
.dtx-libro-row--2 { grid-template-columns: 1fr 1fr; }
.dtx-libro-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ─── Fields ─── */
.dtx-libro-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dtx-libro-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.dtx-libro-field small {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
}

.dtx-libro-field--inline {
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

/* ─── Inputs ─── */
.dtx-libro-form input[type="text"],
.dtx-libro-form input[type="email"],
.dtx-libro-form input[type="tel"],
.dtx-libro-form input[type="number"],
.dtx-libro-form input[type="date"],
.dtx-libro-form input[type="url"],
.dtx-libro-form select,
.dtx-libro-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    color: #111;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.4;
    box-sizing: border-box;
    font-family: inherit;
}

.dtx-libro-form input:focus,
.dtx-libro-form select:focus,
.dtx-libro-form textarea:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17,17,17,0.08);
}

.dtx-libro-form input.dtx-readonly {
    background: #f9fafb;
    color: #6b7280;
    cursor: default;
}

.dtx-libro-form textarea {
    resize: vertical;
    min-height: 80px;
}

.dtx-libro-form select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ─── Tipo reclamo selector ─── */
.dtx-tipo-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dtx-tipo-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.dtx-tipo-option:hover {
    border-color: #6b7280;
    background: #f9fafb;
}

.dtx-tipo-option input[type="radio"] {
    width: auto !important;
    margin-top: 2px;
    flex-shrink: 0;
}

.dtx-tipo-option input[type="radio"]:checked + .dtx-tipo-option__inner strong {
    color: #111;
}

.dtx-tipo-option:has(input:checked) {
    border-color: #111;
    background: #f9fafb;
}

.dtx-tipo-option__inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dtx-tipo-option__inner strong {
    font-size: 13px;
    color: #374151;
}

.dtx-tipo-option__inner small {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
}

/* ─── Radio labels ─── */
.dtx-radio-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.dtx-radio-label input[type="radio"] {
    width: auto !important;
}

/* ─── Checkboxes ─── */
.dtx-libro-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dtx-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    cursor: pointer;
}

.dtx-check-label input[type="checkbox"] {
    width: auto !important;
    margin-top: 2px;
    flex-shrink: 0;
}

.dtx-check-label a {
    color: #111;
    text-decoration: underline;
}

/* ─── Required asterisk ─── */
.dtx-req {
    color: #dc2626;
    font-weight: 700;
}

/* ─── Submit section ─── */
.dtx-libro-section--submit {
    text-align: center;
    background: #fafafa;
}

.dtx-libro-section--recaptcha {
    display: flex;
    justify-content: flex-start;
}

.dtx-libro-submit-btn {
    display: inline-block;
    background: #111;
    color: #fff;
    border: none;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    min-width: 240px;
}

.dtx-libro-submit-btn:hover:not(:disabled) {
    background: #333;
}

.dtx-libro-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.dtx-submit-note {
    font-size: 12px;
    color: #9ca3af;
    margin: 10px 0 0;
}

/* ─── Messages ─── */
.dtx-libro-message {
    margin: 0 28px 20px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.dtx-libro-message--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.dtx-libro-message--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* ─── Success panel ─── */
.dtx-libro-success {
    background: #fff;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 48px 28px;
    text-align: center;
}

.dtx-success-icon {
    width: 64px;
    height: 64px;
    background: #059669;
    color: #fff;
    border-radius: 50%;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.dtx-libro-success h2 {
    font-size: 22px;
    color: #065f46;
    margin: 0 0 16px;
}

.dtx-success-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #d1fae5;
}

/* ─── Validation errors ─── */
.dtx-libro-form input.dtx-invalid,
.dtx-libro-form select.dtx-invalid,
.dtx-libro-form textarea.dtx-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .dtx-libro-row--2,
    .dtx-libro-row--3 {
        grid-template-columns: 1fr;
    }

    .dtx-libro-header {
        flex-direction: column;
        gap: 12px;
    }

    .dtx-libro-section {
        padding: 18px 16px;
    }

    .dtx-libro-section--submit {
        padding: 20px 16px;
    }

    .dtx-libro-submit-btn {
        width: 100%;
    }

    .dtx-libro-field--inline {
        flex-direction: column;
        align-items: flex-start;
    }
}
