/* ===== Reservas Calendario - Frontend ===== */
.rcal-wrapper {
	--rcal-green: #c8f0c0;
	--rcal-green-border: #a9e3a0;
	--rcal-green-dark: #4caf50;
	--rcal-red: #f4b6b6;
	--rcal-red-border: #ef9a9a;
	--rcal-yellow: #ffd87a;
	--rcal-yellow-border: #f5c451;
	--rcal-selected: #7bc96f;
	--rcal-text: #444;
	max-width: 760px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--rcal-text);
	box-sizing: border-box;
}
.rcal-wrapper *, .rcal-wrapper *::before, .rcal-wrapper *::after { box-sizing: border-box; }

.rcal-calendar-panel { border: 1px solid #e2e2e2; border-radius: 8px; padding: 14px; background: #fff; }

/* Cabecera */
.rcal-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.rcal-nav {
	flex: 0 0 auto; width: 38px; height: 38px;
	border: 1px solid #ddd !important; background-color: #f7f7f7 !important;
	background-repeat: no-repeat !important; background-position: center center !important;
	background-size: 13px 13px !important;
	border-radius: 6px; cursor: pointer; padding: 0; font-size: 0; line-height: 0;
	box-shadow: none; -webkit-appearance: none; appearance: none; transition: background-color .15s;
}
.rcal-prev { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 5L8 12l7 7' fill='none' stroke='%23888' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
.rcal-next { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23888' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
.rcal-nav:hover { background-color: #ececec !important; }
.rcal-nav:disabled { cursor: default; opacity: .45; }

.rcal-month-select { flex: 1 1 auto; height: 38px; border: 1px solid #ddd; border-radius: 6px; padding: 0 12px; font-size: 15px; background: #fff; color: var(--rcal-text); cursor: pointer; }

/* Días de la semana */
.rcal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-weight: 700; font-size: 14px; color: #555; margin-bottom: 6px; }

/* Rejilla */
.rcal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.rcal-day { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 15px; user-select: none; transition: transform .1s, box-shadow .1s; }
.rcal-day.rcal-empty { background: transparent; }
.rcal-day.rcal-available { background: var(--rcal-green); border: 1px solid var(--rcal-green-border); cursor: pointer; }
.rcal-day.rcal-available:hover { box-shadow: inset 0 0 0 2px var(--rcal-green-dark); }
.rcal-day.rcal-reserved { background: var(--rcal-red); border: 1px solid var(--rcal-red-border); color: #8a3b3b; cursor: not-allowed; }
.rcal-day.rcal-blocked  { background: var(--rcal-yellow); border: 1px solid var(--rcal-yellow-border); color: #8a6d1f; cursor: not-allowed; }
.rcal-day.rcal-past     { background: #f3f3f3; border: 1px solid #eee; color: #c0c0c0; cursor: not-allowed; }
.rcal-day.rcal-selected { background: var(--rcal-selected); border: 1px solid var(--rcal-green-dark); color: #fff; font-weight: 700; box-shadow: inset 0 0 0 2px #fff; }
.rcal-day.rcal-preview  { background: #a9e0a0; border: 1px solid var(--rcal-green-dark); }

/* Leyenda */
.rcal-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 4px; font-size: 14px; }
.rcal-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.rcal-dot { width: 22px; height: 22px; border-radius: 5px; display: inline-block; }
.rcal-dot-available { background: var(--rcal-green);   border: 1px solid var(--rcal-green-border); }
.rcal-dot-reserved  { background: var(--rcal-red);     border: 1px solid var(--rcal-red-border); }
.rcal-dot-blocked   { background: var(--rcal-yellow);  border: 1px solid var(--rcal-yellow-border); }

/* Resumen */
.rcal-summary { margin-top: 18px; border: 1px solid #e2e2e2; border-radius: 8px; padding: 18px; background: #fafafa; }
.rcal-summary h3 { margin: 0 0 12px; font-size: 18px; }
.rcal-summary-list { list-style: none; margin: 0 0 12px; padding: 0; }
.rcal-summary-list li { padding: 6px 0; border-bottom: 1px dashed #e4e4e4; font-size: 15px; }
.rcal-summary-list li.rcal-total-line { font-size: 18px; }
.rcal-summary-list li.rcal-total-line span   { color: var(--rcal-green-dark); font-weight: 700; }
.rcal-summary-list li.rcal-deposit-line span { color: #d9822b; font-weight: 700; }
.rcal-note { font-size: 13px; color: #777; margin: 10px 0 18px; line-height: 1.5; }

/* Aviso estancia mínima */
.rcal-mindays { background: #fff6e5; border: 1px solid #f5d28a; border-radius: 8px; padding: 18px; }
.rcal-mindays h3 { margin: 0 0 8px; font-size: 18px; color: #9a6a16; }
.rcal-mindays p  { margin: 0 0 10px; font-size: 15px; color: #6b5212; }
.rcal-mindays-contact { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.rcal-mindays-contact a { display: inline-block; background: var(--rcal-green-dark); color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 6px; font-weight: 600; font-size: 15px; }
.rcal-mindays-contact a:hover { background: #429a46; }

/* Formulario */
.rcal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.rcal-field { display: flex; flex-direction: column; }
.rcal-field label { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.rcal-field input { height: 42px; border: 1px solid #d6d6d6; border-radius: 6px; padding: 0 12px; font-size: 15px; width: 100%; }
.rcal-field input:focus { outline: none; border-color: var(--rcal-green-dark); box-shadow: 0 0 0 2px rgba(76,175,80,.15); }

.rcal-people-info { font-size: 13px; color: #777; margin: -2px 0 14px; }

/* Datos de adultos */
.rcal-adults-data { margin-bottom: 16px; }
.rcal-adults-data h4 { margin: 0 0 4px; font-size: 16px; }
.rcal-adults-help { font-size: 13px; color: #777; margin: 0 0 10px; }
.rcal-adult-row { display: grid; grid-template-columns: 30px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.rcal-adult-num { width: 28px; height: 28px; border-radius: 50%; background: var(--rcal-green); border: 1px solid var(--rcal-green-border); color: #2f6e33; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rcal-adult-row input { height: 42px; border: 1px solid #d6d6d6; border-radius: 6px; padding: 0 12px; font-size: 15px; width: 100%; }
.rcal-adult-row input:focus { outline: none; border-color: var(--rcal-green-dark); box-shadow: 0 0 0 2px rgba(76,175,80,.15); }

/* Normas de la propiedad */
.rcal-rules {
	background: #f8f8f8;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 18px;
}
.rcal-rules-title {
	background: #1a1a1a !important;
	color: #fff !important;
	margin: 0;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 700;
}
.rcal-rules-list {
	list-style: none;
	margin: 0;
	padding: 10px 16px 14px;
}
.rcal-rules-list li {
	font-size: 14px;
	color: #444;
	line-height: 1.65;
	padding: 8px 0;
	border-bottom: 1px solid #e8e8e8;
}
.rcal-rules-list li:last-child { border-bottom: none; }
.rcal-rules-list li strong { color: #1a1a1a; }

/* Checkbox política */
.rcal-policy { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.rcal-policy input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.rcal-policy a { color: var(--rcal-green-dark); text-decoration: underline; }

.rcal-error { color: #c0392b; font-size: 14px; margin: 0 0 12px; background: #fdecea; border: 1px solid #f5c6c2; padding: 10px 12px; border-radius: 6px; }
.rcal-confirm-btn, .rcal-modal-ok { background: var(--rcal-green-dark); color: #fff; border: none; border-radius: 6px; padding: 14px 22px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; transition: background .15s; }
.rcal-confirm-btn:hover, .rcal-modal-ok:hover { background: #429a46; }
.rcal-confirm-btn:disabled { opacity: .6; cursor: wait; }

/* Popup */
.rcal-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 16px; }
.rcal-modal { background: #fff; border-radius: 12px; max-width: 460px; width: 100%; padding: 30px 26px; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.rcal-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 26px; line-height: 1; color: #aaa; cursor: pointer; }
.rcal-modal-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--rcal-green-dark); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; }
.rcal-modal h3 { margin: 0 0 10px; font-size: 22px; }
.rcal-modal p  { font-size: 15px; color: #555; line-height: 1.5; }
.rcal-modal-warning { background: #fff6e5; border: 1px solid #f5d28a; color: #9a6a16; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 14px 0 4px; font-weight: 600; }
.rcal-pay-options { display: flex; gap: 12px; margin: 18px 0 6px; }
.rcal-pay-option { flex: 1; border: 2px solid #e8e8e8; border-radius: 10px; padding: 16px 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; cursor: pointer; font: inherit; color: inherit; text-align: center; transition: border-color .15s, background .15s; }
.rcal-pay-option:hover { border-color: var(--rcal-green-dark); }
.rcal-pay-option.rcal-pay-selected { border-color: var(--rcal-green-dark); background: #f1fbef; }
.rcal-pay-option strong { font-size: 16px; color: var(--rcal-green-dark); }
.rcal-pay-option span   { font-size: 15px; font-weight: 600; }
.rcal-modal-note { font-size: 13px; color: #888; margin: 6px 0 18px; }

/* Responsive */
@media (max-width: 600px) {
	.rcal-day { font-size: 14px; }
	.rcal-weekdays { font-size: 13px; }
	.rcal-form { grid-template-columns: 1fr; }
	.rcal-adult-row { grid-template-columns: 24px 1fr; }
	.rcal-adult-row .rcal-adult-num { grid-row: span 2; }
	.rcal-legend { gap: 12px; font-size: 13px; }
	.rcal-dot { width: 18px; height: 18px; }
	.rcal-pay-options { flex-direction: column; }
	.rcal-summary { padding: 14px; }
}
@media (max-width: 380px) {
	.rcal-grid { gap: 3px; }
	.rcal-day { font-size: 13px; border-radius: 5px; }
}
