/* Fincas y Fiestas - precios y disponibilidad */
.fyf-box,
.fyf-booking,
.fyf-dialog,
.fyf-prices {
	--fyf-accent: #ff4a1c;
	--fyf-free: #e8f5e9;
	--fyf-free-text: #1b5e20;
	--fyf-blocked: #ffe0dc;
	--fyf-blocked-text: #b3261e;
	--fyf-booked: #ffe9b8;
	--fyf-booked-text: #7a5200;
	--fyf-external: #dde8f4;
	--fyf-external-text: #24507a;
	--fyf-hold: #e4dcfa;
	--fyf-hold-text: #4a2fa0;
	--fyf-border: #d9dde3;
	font-size: 14px;
	line-height: 1.4;
}

.fyf-box { border: 1px solid var(--fyf-border); border-radius: 8px; padding: 16px; background: #fff; }
.fyf-row { display: flex; flex-wrap: wrap; gap: 16px; }
.fyf-row > label { flex: 1 1 220px; }
.fyf-box label { display: block; font-weight: 600; margin-bottom: 8px; }
.fyf-box input[type="number"],
.fyf-box input[type="text"],
.fyf-box input[type="date"] { display: block; width: 100%; max-width: 100%; margin-top: 4px; font-weight: 400; }
.fyf-box small { display: block; font-weight: 400; color: #6b7280; margin-top: 2px; }
.fyf-h { margin: 18px 0 4px; font-size: 15px; }
.fyf-help { margin: 0 0 10px; color: #6b7280; }

.fyf-season { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 10px; margin-bottom: 8px; border: 1px dashed var(--fyf-border); border-radius: 6px; }
.fyf-season > label { flex: 1 1 140px; margin: 0; }
.fyf-season .fyf-check { flex: 1 1 100%; font-weight: 400; }
.fyf-season .fyf-check input { display: inline-block; width: auto; margin-right: 6px; }

.fyf-btn { display: inline-block; padding: 7px 14px; border: 1px solid var(--fyf-accent); border-radius: 4px; background: #fff; color: var(--fyf-accent); font-weight: 600; cursor: pointer; }
.fyf-btn:hover { background: var(--fyf-accent); color: #fff; }

.fyf-legend { margin: 8px 0; }
.fyf-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 4px 0 12px; vertical-align: -1px; }
.fyf-key:first-child { margin-left: 0; }
.fyf-k-free { background: var(--fyf-free); border: 1px solid #b7dfba; }
.fyf-k-blocked { background: var(--fyf-blocked); border: 1px solid #f3b5ae; }
.fyf-k-external { background: var(--fyf-external); border: 1px solid #b4c9e0; }
.fyf-k-hold { background: var(--fyf-hold); border: 1px solid #c3b4f0; }
.fyf-k-booked { background: var(--fyf-booked); border: 1px solid #f0cf85; }

.fyf-range { margin-top: 12px; }
.fyf-range input[type="date"] { display: inline-block; width: auto; margin: 0 4px; }

/* Calendar */
.fyf-cal-nav { display: flex; justify-content: space-between; margin-bottom: 6px; }
.fyf-cal-nav button { width: 32px; height: 32px; border: 1px solid var(--fyf-border); border-radius: 50%; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.fyf-months { display: flex; flex-wrap: wrap; gap: 20px; }
.fyf-month { flex: 1 1 240px; min-width: 240px; }
.fyf-month-title { font-weight: 700; text-align: center; margin-bottom: 6px; }
.fyf-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.fyf-dow { text-align: center; font-size: 12px; color: #6b7280; }
.fyf-day { padding: 7px 0; border: 1px solid transparent; border-radius: 4px; background: var(--fyf-free); color: var(--fyf-free-text); font-weight: 600; text-align: center; cursor: pointer; }
.fyf-day:hover:not([disabled]) { border-color: var(--fyf-accent); }
.fyf-day.fyf-past { background: #f3f4f6; color: #b4b9c2; cursor: default; }
.fyf-day.fyf-blocked { background: var(--fyf-blocked); color: var(--fyf-blocked-text); text-decoration: line-through; }
.fyf-day.fyf-external { background: var(--fyf-external); color: var(--fyf-external-text); cursor: not-allowed; }
.fyf-day.fyf-hold { background: var(--fyf-hold); color: var(--fyf-hold-text); cursor: not-allowed; }
.fyf-day.fyf-booked { background: var(--fyf-booked); color: var(--fyf-booked-text); cursor: not-allowed; }
.fyf-day.fyf-today { box-shadow: inset 0 0 0 2px #334155; }
.fyf-day.fyf-selected { background: var(--fyf-accent); color: #fff; }
.fyf-day.fyf-inrange { background: #ffd2c6; color: #7a1f0a; }

/* The widget inside the wp-admin meta box */
.postbox .fyf-box { border: 0; padding: 0; }

/* Make the inputs look the same whatever the theme does to form fields */
.fyf-box input[type="number"],
.fyf-box input[type="text"],
.fyf-box input[type="date"] {
	height: auto;
	padding: 8px 10px;
	border: 1px solid var(--fyf-border);
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	box-sizing: border-box;
}

/* Public box on the listing page */
.fyf-booking .fyf-prices { list-style: none; margin: 0 0 8px; padding: 0; }
.fyf-booking .fyf-prices li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--fyf-border); }
.fyf-booking .fyf-price-title { margin: 14px 0 6px; font-size: 17px; font-weight: 700; color: var(--fyf-ink, #1d1d1f); }
.fyf-booking .fyf-price-name small { display: block; color: #6b7280; font-size: 12px; }
.fyf-booking .fyf-price-value { white-space: nowrap; color: var(--fyf-accent); }
.fyf-note { margin: 8px 0; color: #4b5563; }
.fyf-booking .fyf-months { display: block; }
.fyf-booking .fyf-month { min-width: 0; }
.fyf-quote { margin-top: 12px; }
.fyf-summary { padding: 12px; border: 1px solid var(--fyf-border); border-radius: 6px; background: #fafafa; }
.fyf-total { margin-top: 6px; font-size: 16px; }
.fyf-total strong { color: var(--fyf-accent); font-size: 18px; }
.fyf-detail { list-style: none; margin: 8px 0 0; padding: 0; }
.fyf-detail li { display: flex; justify-content: space-between; padding: 3px 0; }
.fyf-detail small { color: #6b7280; }
.fyf-msg { margin: 0; padding: 10px 12px; border-radius: 6px; }
.fyf-msg-bad { background: var(--fyf-blocked); color: var(--fyf-blocked-text); }

/* Date filter inside the search forms */
.fyf-filter { margin: 12px 0; text-align: left; }
.fyf-filter-title { font-weight: 700; margin-bottom: 6px; }
.fyf-filter-fields { display: flex; gap: 10px; }
.fyf-filter-field { flex: 1 1 0; min-width: 0; }
.fyf-filter-caption { display: block; font-weight: 600; font-size: 13px; }
.fyf-filter-field input[type="date"] { display: block; width: 100%; margin-top: 3px; padding: 8px 10px; border: 1px solid #d9dde3; border-radius: 4px; background: #fff; box-sizing: border-box; height: auto; }
.fyf-filter-hint { margin: 6px 0 0; font-size: 12px; color: #6b7280; }

/* Home page hero: the bar is a single row, so the dates sit in their own row under it */
.js-search-form .search_jobs .fyf-filter:not([data-ready]) { display: none; }
.fyf-filter--hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: 0; padding: 12px 16px; color: #1f2937; background: #fff; }
.fyf-filter--hero .fyf-filter-title { margin: 0; }
.fyf-filter--hero .fyf-filter-fields { width: auto; gap: 10px; }
.fyf-filter--hero .fyf-filter-field { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; }
.fyf-filter--hero .fyf-filter-caption { display: inline; }
.fyf-filter--hero input[type="date"] { width: 170px; margin: 0; }
.fyf-filter--hero .fyf-filter-hint { display: none; }

/* Booking request form */
.fyf-request { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--fyf-border); }
.fyf-request[hidden] { display: none; }
.fyf-request input[type="text"],
.fyf-request input[type="email"],
.fyf-request input[type="tel"],
.fyf-request input[type="number"],
.fyf-request textarea { display: block; width: 100%; margin: 0 0 8px; padding: 9px 10px; border: 1px solid var(--fyf-border); border-radius: 4px; background: #fff; box-sizing: border-box; height: auto; }
.fyf-hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.fyf-btn-primary { width: 100%; padding: 11px 14px; background: var(--fyf-accent); color: #fff; }
.fyf-btn-primary:hover { background: #d93a12; }
.fyf-btn[disabled] { opacity: .6; cursor: wait; }
.fyf-msg-ok { background: #e6f4ea; color: #1b5e20; }

/* Personas, precio por persona adicional y detalle de la reserva */
.fyf-guests-label { display: block; font-weight: 600; margin: 14px 0 6px; }
.fyf-guests { width: 100%; max-width: 220px; }
.fyf-card-price { margin: 6px 0 0; color: var(--fyf-ink, #1d1d1f); font-size: 15px; }
.fyf-card-price small { display: block; color: #6e6e73; font-size: 13px; font-weight: 400; }
.fyf-filter-fields { flex-wrap: wrap; }
.fyf-breakdown { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; }
.fyf-breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.fyf-breakdown .fyf-final { border-top: 1px solid rgba(0,0,0,.12); margin-top: 4px; padding-top: 6px; font-weight: 700; font-size: 16px; }
.fyf-reserva-info { margin-top: 14px; padding: 14px; border: 1px solid #d2d2d7; border-radius: 12px; background: #fafafa; }
.fyf-reserva-info h4 { margin: 0 0 8px; }
.fyf-reserva-info dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.fyf-reserva-info dt { color: #6e6e73; }
.fyf-reserva-info dd { margin: 0; word-break: break-word; }
.fyf-breakdown li span:last-child { white-space: nowrap; }
.fyf-msg-warn { background: var(--fyf-booked); color: var(--fyf-booked-text); }

/* Diálogo con los datos de una solicitud (calendario del propietario) */
.fyf-dialog-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.fyf-dialog { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; border-radius: 16px; background: #fff; color: #1d1d1f; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.fyf-dialog h4 { margin: 0 0 12px; font-size: 19px; }
.fyf-dialog dl { margin: 0 0 12px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.fyf-dialog dt { color: #6e6e73; }
.fyf-dialog dd { margin: 0; word-break: break-word; }
.fyf-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }

.fyf-ical { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fyf-ical .fyf-ical-url { flex: 1 1 320px; min-width: 0; }
.fyf-ical-status { flex-basis: 100%; }

.fyf-dialog-form label { display: block; margin: 0 0 10px; font-size: 14px; color: #444; }
.fyf-dialog-form input[type=text], .fyf-dialog-form input[type=tel], .fyf-dialog-form input[type=email], .fyf-dialog-form input[type=number], .fyf-dialog-form textarea { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
.fyf-dialog h5 { margin: 14px 0 8px; font-size: 15px; }
.fyf-saldo { margin: 0 0 10px; font-weight: 600; }
.fyf-dialog-error:empty { display: none; }
.fyf-dialog .fyf-btn-primary { width: auto; }
.fyf-quote-box:empty { display: none; }
.fyf-dialog .fyf-breakdown { margin: 0 0 12px; padding: 12px; background: #f4f5f7; border-radius: 10px; }
.fyf-msg-warn { background: var(--fyf-booked); color: var(--fyf-booked-text); }
.fyf-total-title { margin: 0 0 10px; font-size: 22px; font-weight: 800; color: var(--fyf-accent); }

.fyf-pay-list { margin: 0 0 12px; padding: 0; list-style: none; font-size: 14px; }
.fyf-pay-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.fyf-pay-list li.is-void { opacity: .5; text-decoration: line-through; }
.fyf-link { background: none; border: 0; padding: 0; color: #b3261e; cursor: pointer; text-decoration: underline; font-size: 13px; }
.fyf-dialog form + form { margin-top: 12px; }
.fyf-breakdown li.fyf-discount { color: var(--fyf-accent); font-weight: 600; }

.fyf-feed { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.fyf-feed .fyf-feed-url { flex: 1 1 320px; min-width: 0; font-size: 13px; }
.fyf-feed .fyf-feed-msg { color: var(--fyf-accent); font-weight: 600; }
