/* ===== RDDT - Libro de Reclamaciones - Frontend CSS =====
 * Kadence-compatible: all rules scoped under .rddt-wrap or .rddt-standalone-*
 * Does NOT override global font-family, colors, or Kadence CSS variables.
 * ======================================================== */

/* Scoped plugin variables — set per-instance via inline <style> in template */
.rddt-wrap {
	--rddt-primary:   #c0392b;
	--rddt-secondary: #1a2748;
	--rddt-btn:       #5b7dd8;
	--rddt-active-step: #1b1aff;
	--rddt-border:    #d0d5dd;
	--rddt-radius:    6px;
	--rddt-success:   #27ae60;
}

/* ===== BOX SIZING ===== */
.rddt-wrap *, .rddt-standalone-wrap * { box-sizing: border-box; }

/* ===== FORM TITLE ===== */
.rddt-wrap .rddt-form-title {
	text-align: center;
	margin: 0 0 20px;
	font-weight: 700;
	color: var(--rddt-secondary);
}

/* ===== COMPANY CARD ===== */
.rddt-wrap .rddt-company-card {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	background: #f4f5f8;
	border: 1px solid #e0e4ea;
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 22px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rddt-wrap .rddt-company-logo-wrap {
	flex-shrink: 0;
}
.rddt-wrap .rddt-company-logo-img {
	width: 110px;
	height: 110px;
	object-fit: contain;
	border-radius: 4px;
	display: block;
}
.rddt-wrap .rddt-logo-placeholder {
	width: 110px;
	height: 110px;
	background: #2c3e50;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}
.rddt-wrap .rddt-logo-placeholder span {
	color: rgba(255,255,255,0.7);
	text-align: center;
	line-height: 1.4;
}
.rddt-wrap .rddt-company-info { flex: 1; min-width: 0; }
.rddt-wrap .rddt-company-name {
	font-weight: 700;
	margin: 0 0 10px;
	color: #1a1a1a;
}
.rddt-wrap .rddt-company-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 20px;
}
.rddt-wrap .rddt-company-col p {
	margin: 4px 0;
	color: #444;
	line-height: 1.5;
}
.rddt-wrap .rddt-arrow-icon {
	color: #3b52c9;
	margin-right: 2px;
	font-style: normal;
}

/* ===== STEPS BAR ===== */
.rddt-wrap .rddt-steps-bar {
	display: flex;
	align-items: flex-start;
	gap: 0;
	margin-bottom: 32px;
	position: relative;
}
/* Connecting line */
.rddt-wrap .rddt-steps-bar::before {
	content: '';
	position: absolute;
	top: 17px;
	left: calc(100% / 6);
	right: calc(100% / 6);
	height: 2px;
	background: #d0d5dd;
	z-index: 0;
}
.rddt-wrap .rddt-step-arrow {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: none;
	color: #aaa;
	padding: 0;
	clip-path: none;
	cursor: default;
	position: relative;
	z-index: 1;
	transition: color 0.2s;
	text-align: center;
}
.rddt-wrap .rddt-step-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #d0d5dd;
	color: #fff;
	font-weight: 700;
	flex-shrink: 0;
	transition: background 0.2s;
}
.rddt-wrap .rddt-step-text {
	line-height: 1.3;
	color: #aaa;
	transition: color 0.2s;
}
.rddt-wrap .rddt-step-text strong { display: block; }
.rddt-wrap .rddt-step-arrow--active {
	color: var(--rddt-secondary);
}
.rddt-wrap .rddt-step-arrow--active .rddt-step-circle {
	background: var(--rddt-active-step, #1b1aff);
}
.rddt-wrap .rddt-step-arrow--active .rddt-step-text {
	color: var(--rddt-secondary);
	font-weight: 600;
}
.rddt-wrap .rddt-step-arrow--done {
	color: var(--rddt-secondary);
}
.rddt-wrap .rddt-step-arrow--done .rddt-step-circle {
	background: var(--rddt-secondary);
}
.rddt-wrap .rddt-step-arrow--done .rddt-step-text {
	color: var(--rddt-secondary);
}

/* Step hint (mobile only — updated by JS) */
.rddt-wrap .rddt-step-hint {
	display: none;
	margin: 0;
}

/* ===== FORM PAGE CONTAINER ===== */
.rddt-wrap .rddt-page {
	background: #fff;
	border-radius: var(--rddt-radius);
	padding: 26px 28px 20px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.07);
	margin-bottom: 16px;
}

/* ===== SECTION HEADINGS ===== */
.rddt-wrap .rddt-section-heading {
	font-weight: 700;
	color: var(--rddt-primary);
	margin: 22px 0 10px;
	padding: 0;
	border: none;
	background: none;
}
.rddt-wrap .rddt-page > .rddt-section-heading:first-child { margin-top: 0; }

/* ===== GRID ===== */
.rddt-wrap .rddt-row {
	display: flex;
	gap: 14px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.rddt-wrap .rddt-col { display: flex; flex-direction: column; }
.rddt-wrap .rddt-col-12 { width: 100%; }
.rddt-wrap .rddt-col-8  { width: calc(66.66% - 8px); }
.rddt-wrap .rddt-col-6  { width: calc(50% - 7px); }
.rddt-wrap .rddt-col-5  { width: calc(41.66% - 7px); }
.rddt-wrap .rddt-col-4  { width: calc(33.33% - 10px); }
.rddt-wrap .rddt-col-3  { width: calc(25% - 11px); }

/* ===== LABELS ===== */
.rddt-wrap .rddt-label {
	display: block;
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}
.rddt-wrap .rddt-req  { color: var(--rddt-primary); margin-left: 1px; }
.rddt-wrap .rddt-optional { font-weight: 400; color: #888; }

/* ===== INPUTS — scoped so Kadence styles don't win ===== */
.rddt-wrap input[type="text"],
.rddt-wrap input[type="email"],
.rddt-wrap input[type="number"],
.rddt-wrap input[type="tel"],
.rddt-wrap input[type="date"],
.rddt-wrap input[type="password"],
.rddt-wrap select,
.rddt-wrap textarea {
	width: 100%;
	padding: 5px 12px;
	border: 1px solid #d0d5dd;
	border-radius: var(--rddt-radius);
	color: #333;
	font-family: inherit;
	background: #fff;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}
.rddt-wrap input[type="date"] { -webkit-appearance: auto; appearance: auto; }
.rddt-wrap select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; cursor: pointer; }
.rddt-wrap input:focus,
.rddt-wrap select:focus,
.rddt-wrap textarea:focus {
	border-color: var(--rddt-primary);
	box-shadow: 0 0 0 3px rgba(91,125,216,0.12);
}
.rddt-wrap textarea { resize: vertical; }

/* ===== RADIO GROUPS ===== */
.rddt-wrap .rddt-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	padding: 4px 0 2px;
}
.rddt-wrap .rddt-radio {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-weight: 400;
	color: #333;
	margin: 0;
}
.rddt-wrap .rddt-radio input[type="radio"] {
	width: auto;
	padding: 0;
	margin: 0;
	flex-shrink: 0;
	accent-color: var(--rddt-primary);
	border: none;
	box-shadow: none;
}

/* ===== MISC TEXT ===== */
.rddt-wrap .rddt-legal-note {
	color: #555;
	line-height: 1.55;
	margin: 0 0 12px;
}
.rddt-wrap .rddt-hint {
	color: #666;
	margin: 6px 0 0;
	line-height: 1.5;
}
.rddt-wrap .rddt-legal-box {
	background: #f8f9fa;
	border: 1px solid #e0e4ea;
	border-radius: var(--rddt-radius);
	padding: 14px 16px;
	color: #555;
	margin: 14px 0;
	line-height: 1.6;
}
.rddt-wrap .rddt-legal-box p { margin: 0 0 8px; }
.rddt-wrap .rddt-legal-box p:last-child { margin: 0; }
.rddt-wrap .rddt-legal-box a { color: var(--rddt-primary); }

/* ===== BUTTONS ===== */
.rddt-wrap .rddt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 5px 26px;
	border-radius: 5px;
	border: none;
	cursor: pointer;
	font-weight: 600;
	font-family: inherit;
	text-decoration: none;
	line-height: 1.4;
	transition: opacity 0.15s, box-shadow 0.15s;
}
.rddt-wrap .rddt-btn:hover { opacity: 0.88; box-shadow: 0 3px 8px rgba(0,0,0,0.15); }
.rddt-wrap .rddt-btn-next,
.rddt-wrap .rddt-btn-submit,
.rddt-wrap .rddt-btn-primary {
	background: #8b7fe8;
	color: #fff !important;
	border-radius: 50px;
	font-weight: 700;
	flex: 1;
}
.rddt-wrap .rddt-btn-prev {
	background: #5ef0f0;
	color: #0056e0 !important;
	border-radius: 50px;
	font-weight: 700;
	flex: 1;
}
.rddt-wrap .rddt-btn-pdf {
	background: var(--rddt-secondary);
	color: #fff !important;
	padding: 8px 16px;
}
.rddt-wrap .rddt-btn-block {
	display: flex;
	width: 100%;
	margin-top: 8px;
}

/* ===== FORM NAV ===== */
.rddt-wrap .rddt-form-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #e8eaed;
}
.rddt-wrap .rddt-form-nav .rddt-btn {
	width: 33.333%;
	flex: none;
	justify-content: center;
}
.rddt-wrap .rddt-required-note {
	color: #e74c3c;
	font-weight: 500;
	margin: 12px 0 6px;
}
/* When only one button (step 1 Siguiente, no back btn) */
.rddt-wrap .rddt-form-nav > .rddt-btn:only-child {
	width: 33.333%;
	flex: none;
	margin-left: auto;
}

/* ===== ERROR BOX ===== */
.rddt-wrap .rddt-error-box {
	background: #fef0ef;
	color: #c0392b;
	border: 1px solid #f5c6cb;
	border-radius: var(--rddt-radius);
	padding: 10px 14px;
	margin: 10px 0;
}

/* ===== VALIDATION ===== */
.rddt-wrap input.rddt-field-error,
.rddt-wrap select.rddt-field-error,
.rddt-wrap textarea.rddt-field-error {
	border-color: #e74c3c !important;
	box-shadow: 0 0 0 3px rgba(231,76,60,0.12);
}
.rddt-wrap .rddt-label.rddt-label-error { color: #e74c3c; }

/* ===== RESULT BOX ===== */
.rddt-wrap #rddt-result { margin-bottom: 16px; }
.rddt-wrap .rddt-result-box {
	background: #fff;
	border-radius: var(--rddt-radius);
	padding: 36px 28px;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.rddt-wrap .rddt-result-icon { margin-bottom: 12px; }
.rddt-wrap .rddt-result-box h3 { margin: 0 0 8px; color: var(--rddt-success); }
.rddt-wrap .rddt-result-data {
	display: inline-block;
	background: #f8f9fa;
	border-radius: var(--rddt-radius);
	padding: 14px 24px;
	margin: 16px auto;
	text-align: left;
	min-width: 260px;
}
.rddt-wrap .rddt-result-row {
	padding: 6px 0;
	border-bottom: 1px solid #eee;
	display: flex;
	gap: 8px;
}
.rddt-wrap .rddt-result-row:last-child { border: none; }
.rddt-wrap .rddt-result-label { color: #777; min-width: 90px; }
.rddt-wrap .rddt-result-save-note {
	color: #e67e22;
	margin: 0 0 18px;
}

/* ===== FOOTER LEGAL ===== */
.rddt-wrap .rddt-footer-legal {
	margin-top: 16px;
	color: #666;
	line-height: 1.6;
}
.rddt-wrap .rddt-footer-legal ul { margin: 0; padding-left: 18px; }
.rddt-wrap .rddt-footer-legal li { margin-bottom: 6px; }

/* ===== STANDALONE PAGES (page-reclamo, page-buscador) ===== */
body.rddt-standalone-page {
	margin: 0; padding: 0;
	background: #f0f2f5;
	font-family: 'Segoe UI', Arial, sans-serif;
}
.rddt-standalone-wrap { min-height: 100vh; display: flex; flex-direction: column; }

.rddt-page-header { background: var(--rddt-secondary, #1a2748); color: #fff; padding: 0; }
.rddt-header-inner {
	max-width: 1100px; margin: 0 auto; padding: 18px 24px;
	display: flex; align-items: center; gap: 20px;
}
.rddt-logo img { max-height: 70px; display: block; }
.rddt-header-info { flex: 1; }
.rddt-header-info h1 { margin: 0 0 5px; color: #fff; }
.rddt-header-info p  { margin: 2px 0; color: rgba(255,255,255,0.8); }
.rddt-libro-badge {
	background: var(--rddt-primary, #c0392b); color: #fff; padding: 10px 14px;
	border-radius: 6px; text-align: center; font-weight: 700;
	text-transform: uppercase; line-height: 1.3; flex-shrink: 0;
}
.rddt-libro-icon { display: block; margin-bottom: 3px; }

.rddt-reclamo-detail { max-width: 1100px; margin: 0 auto; padding: 24px; flex: 1; }
.rddt-reclamo-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.rddt-reclamo-left { display: flex; align-items: center; gap: 16px; }
.rddt-reclamo-ids { color: #555; }
.rddt-reclamo-ids div { margin-bottom: 3px; }

.rddt-reclamo-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.rddt-data-section { background: #fff; border-radius: 6px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
.rddt-data-section h3 { margin: 0 0 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #1a2748; padding-bottom: 8px; border-bottom: 2px solid var(--rddt-primary, #c0392b); }
.rddt-data-row { padding: 5px 0; color: #444; border-bottom: 1px solid #f0f0f0; }
.rddt-data-row:last-child { border: none; }

.rddt-highlight { border-left: 4px solid #27ae60; }
.rddt-highlight h3 { color: #27ae60; border-color: #27ae60; }
.rddt-respuesta { border-left: 4px solid var(--rddt-primary, #c0392b); }
.rddt-legal-list { color: #666; padding-left: 16px; margin: 8px 0 0; }
.rddt-legal-list li { margin-bottom: 4px; }
.rddt-respuesta-fecha { color: #888; margin-top: 8px; }

.rddt-estado-badge { display: inline-block; padding: 5px 14px; border-radius: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.rddt-estado-ingresado    { background: #d6eaf8; color: #1a5276; }
.rddt-estado-en-revision  { background: #fef9e7; color: #9a7d0a; }
.rddt-estado-en-proceso   { background: #fdf2e9; color: #a04000; }
.rddt-estado-resuelto     { background: #d5f5e3; color: #1e8449; }
.rddt-estado-cerrado      { background: #eaecee; color: #555; }
.rddt-estado-improcedente { background: #f9ebea; color: #922b21; }

.rddt-not-found { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }

.rddt-auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.rddt-auth-box { background: #fff; border-radius: 8px; padding: 36px 40px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.rddt-auth-icon { margin-bottom: 12px; }
.rddt-auth-box h2 { margin: 0 0 8px; }
.rddt-auth-box p { color: #666; margin: 0 0 16px; }
.rddt-auth-box input[type="password"] { text-align: center; letter-spacing: 2px; margin-bottom: 14px; }
.rddt-auth-box .rddt-btn { width: 100%; margin-top: 4px; }
.rddt-auth-box .rddt-error-box { margin: 0 0 12px; }
.rddt-back-link { display: block; margin-top: 16px; color: var(--rddt-primary, #c0392b); text-decoration: none; }

.rddt-buscador-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.rddt-buscador-box { background: #fff; border-radius: 8px; padding: 36px 40px; max-width: 440px; width: 100%; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.rddt-buscador-icon { margin-bottom: 12px; }
.rddt-buscador-box h2 { margin: 0 0 8px; }
.rddt-buscador-box p { color: #666; margin: 0 0 20px; }
.rddt-form-group { text-align: left; margin-bottom: 14px; }
.rddt-form-group label { display: block; font-weight: 600; color: #333; margin-bottom: 5px; }
.rddt-form-group input { width: 100%; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: 6px; font-family: inherit; outline: none; }
.rddt-form-group input:focus { border-color: #3aa7d5; box-shadow: 0 0 0 3px rgba(58,167,213,0.12); }
.rddt-buscador-shortcode .rddt-buscador-box { max-width: 100%; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.rddt-buscador-shortcode .rddt-btn { width: 100%; }
#buscar-error, #sc-buscar-error { background: #fef0ef; color: #c0392b; border: 1px solid #f5c6cb; border-radius: 5px; padding: 9px 12px; margin: 8px 0; text-align: left; }

.rddt-page-footer { background: #1a2748; color: rgba(255,255,255,0.65); text-align: center; padding: 14px; margin-top: auto; }

/* ===== STANDALONE BUTTONS ===== */
.rddt-standalone-page .rddt-btn,
.rddt-auth-box .rddt-btn,
.rddt-buscador-box .rddt-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 10px 26px; border-radius: 5px; border: none; cursor: pointer;
	font-weight: 600; font-family: inherit; text-decoration: none;
	transition: opacity 0.15s;
}
.rddt-standalone-page .rddt-btn:hover { opacity: 0.87; }
.rddt-standalone-page .rddt-btn-primary,
.rddt-auth-box .rddt-btn,
.rddt-buscador-box .rddt-btn[type="submit"] {
	background: var(--rddt-btn, #5b7dd8);
	color: #fff !important;
}
.rddt-standalone-page .rddt-btn-pdf { background: #1a2748; color: #fff !important; padding: 8px 16px; }
.rddt-standalone-page .rddt-error-box { background: #fef0ef; color: #c0392b; border: 1px solid #f5c6cb; border-radius: 5px; padding: 9px 12px; margin: 8px 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
	/* Let theme container handle horizontal gutters */
	.rddt-wrap .rddt-company-card { flex-direction: column; gap: 14px; padding: 10px; }
	.rddt-wrap .rddt-company-cols { grid-template-columns: 1fr; gap: 0; }
	.rddt-wrap .rddt-company-logo-img,
	.rddt-wrap .rddt-logo-placeholder { width: 80px; height: 80px; }
	.rddt-wrap .rddt-col-6,
	.rddt-wrap .rddt-col-5,
	.rddt-wrap .rddt-col-4,
	.rddt-wrap .rddt-col-3,
	.rddt-wrap .rddt-col-8 { width: 100%; }
	.rddt-wrap .rddt-page { padding: 18px 0; }
	/* Steps bar mobile: hide full text, show one short word below each circle */
	.rddt-wrap .rddt-step-text { display: none; }
	.rddt-wrap .rddt-step-arrow::after {
		content: attr(data-short);
		display: block;
		color: #999;
		margin-top: 6px;
		white-space: nowrap;
		font-weight: 500;
	}
	.rddt-wrap .rddt-step-arrow--active::after {
		color: var(--rddt-secondary);
		font-weight: 700;
	}
	.rddt-wrap .rddt-step-arrow--done::after {
		color: var(--rddt-secondary);
		font-weight: 600;
	}
	.rddt-wrap .rddt-step-circle { width: 28px; height: 28px; }
	.rddt-wrap .rddt-steps-bar::before { top: 14px; }
	.rddt-wrap .rddt-step-hint {
		display: block;
		text-align: center;
		color: #888;
		margin: -12px 0 16px;
		font-weight: 400;
	}
	.rddt-wrap .rddt-form-nav .rddt-btn { width: 50%; flex: none; }
	.rddt-wrap .rddt-form-nav > .rddt-btn:only-child { width: 50%; flex: none; margin-left: auto; }
	.rddt-header-inner { flex-direction: column; text-align: center; }
	.rddt-libro-badge { display: none; }
	.rddt-reclamo-body { grid-template-columns: 1fr; }
	.rddt-reclamo-detail { padding: 16px 0; }
	.rddt-auth-box, .rddt-buscador-box { padding: 24px 0; box-shadow: none; }
	.rddt-buscador-box { border-radius: 0; }

	.rddt-wrap input[type="text"],
.rddt-wrap input[type="email"],
.rddt-wrap input[type="number"],
.rddt-wrap input[type="tel"],
.rddt-wrap input[type="date"],
.rddt-wrap input[type="password"],
.rddt-wrap select,
.rddt-wrap textarea {
	width: 100%;
	padding: 5px 12px;}
}
