/* ============================================================
   Resly iCal Calendar - Noosa Luxury Holidays
   v2.17.0 - single card layout (matches The Cove style), NLH gold
   Sizes are in px: the theme's root font size is not 16px.
   ============================================================ */

.resly-ical-calendar {
    /* Accent shades come from the Accent Colour setting (inline style);
       these are only fallbacks */
    --rc-gold: var(--rc-accent-light, #d0bb9a);
    --rc-gold-dark: var(--rc-accent, #b8a082);
    --rc-text: #2c2c2c;
    --rc-muted: #8f877a;
    --rc-line: #ece7df;
    position: relative;
    max-width: 100%;
    margin: 0 0 16px 0;
    padding: 26px 22px 22px;
    background: #ffffff;
    border: 1px solid #efeae2;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(44, 44, 44, 0.07);
    font-family: 'yantramanav', sans-serif;
    color: var(--rc-text);
    box-sizing: border-box;
}
.resly-ical-calendar *,
.resly-ical-calendar *::before,
.resly-ical-calendar *::after {
    box-sizing: border-box;
}

/* ── Title ─────────────────────────────────────────────────── */
.resly-ical-calendar .calendar-title {
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    font-family: 'yantramanav', sans-serif !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    text-align: center;
    color: var(--rc-gold-dark) !important;
}

/* ── Month navigation ──────────────────────────────────────── */
.resly-ical-calendar .calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
}
.resly-ical-calendar .nav-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    padding: 0 0 2px !important;
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    color: var(--rc-gold-dark) !important;
    background: #fff !important;
    border: 1px solid #e6dfd4 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.resly-ical-calendar .nav-btn:hover:not(:disabled) {
    background: var(--rc-band, #faf6f0) !important;
    border-color: var(--rc-gold) !important;
}
.resly-ical-calendar .nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.resly-ical-calendar .current-month {
    flex: 1;
    padding: 0 8px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--rc-text);
}

/* ── Month grid ────────────────────────────────────────────── */
.resly-ical-calendar .calendar-grid-container {
    display: block;
    width: 100%;
}
.resly-ical-calendar .calendar-month {
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.resly-ical-calendar .calendar-header {
    margin: 4px 0 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--rc-text);
}
.resly-ical-calendar.has-navigation .calendar-header {
    display: none;
}
.resly-ical-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 6px;
    column-gap: 0;
    width: 100%;
}
.resly-ical-calendar .day-header {
    padding: 4px 0 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rc-muted);
}

/* ── Day cells ─────────────────────────────────────────────── */
.resly-ical-calendar .day-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
    color: #c9c3b9;
    background: transparent;
    border: 0;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}
.resly-ical-calendar .day-cell.empty {
    background: transparent;
}
.resly-ical-calendar .day-cell.past {
    color: #d6d1c8;
    text-decoration: none;
}
.resly-ical-calendar .day-cell.available {
    color: var(--rc-text);
    font-weight: 600;
    cursor: pointer;
}
.resly-ical-calendar .day-cell.available:hover {
    background: var(--rc-band, #f6f0e7);
}
.resly-ical-calendar .day-cell.unavailable {
    color: #cfc9bf;
    text-decoration: line-through;
}
.resly-ical-calendar .day-cell.loading {
    color: transparent;
    background: #f5f3ef;
    animation: nlh-pulse 1.5s ease-in-out infinite;
}
@keyframes nlh-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Turnover day: booked for arrivals, but fine as a check-out date */
.resly-ical-calendar .day-cell.unavailable.checkout-eligible {
    color: var(--rc-text);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.resly-ical-calendar .day-cell.unavailable.checkout-eligible::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--rc-gold);
}
.resly-ical-calendar .day-cell.unavailable.checkout-eligible:hover {
    background: var(--rc-band, #f6f0e7);
}

/* Selected range: light band with gold circles at each end */
.resly-ical-calendar .day-cell.in-range {
    color: var(--rc-text);
    font-weight: 600;
    background: var(--rc-band, #f6efe4);
    border-radius: 0;
}
.resly-ical-calendar .day-cell.selected-checkin,
.resly-ical-calendar .day-cell.selected-checkout {
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0;
    background: radial-gradient(circle closest-side, var(--rc-gold-dark) 97%, transparent 100%) !important;
}
/* join the end circles to the band so the stay reads as one block */
.resly-ical-calendar .day-cell.selected-checkin.has-range {
    background:
        radial-gradient(circle closest-side, var(--rc-gold-dark) 97%, transparent 100%),
        linear-gradient(to right, transparent 50%, var(--rc-band, #f6efe4) 50%) !important;
}
.resly-ical-calendar .day-cell.selected-checkout {
    background:
        radial-gradient(circle closest-side, var(--rc-gold-dark) 97%, transparent 100%),
        linear-gradient(to left, transparent 50%, var(--rc-band, #f6efe4) 50%) !important;
}

/* ── Loading / notes / errors ──────────────────────────────── */
.resly-ical-calendar .calendar-loading {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rc-gold-dark);
}
.resly-ical-calendar .min-stay-note {
    margin: 10px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--rc-muted);
}
.resly-ical-error {
    padding: 12px;
    font-size: 14px;
    color: #8b2020;
    background: #fdf0f0;
    border: 1px solid #e8c8c8;
    border-radius: 8px;
}

/* ── Selected dates status ─────────────────────────────────── */
.resly-ical-calendar .calendar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 0;
    padding: 11px 14px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--rc-muted);
    background: var(--rc-band, #faf7f2);
    border-radius: 10px;
}
.resly-ical-calendar .calendar-status.has-dates {
    color: var(--rc-accent-text, #8a7556);
    font-weight: 600;
    background: var(--rc-band, #f6efe4);
}
.resly-ical-calendar button.clear-dates {
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    font: inherit;
    font-size: 13px !important;
    font-weight: 500;
    color: var(--rc-accent-text, #8a7556) !important;
    text-decoration: underline;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}
.resly-ical-calendar button.clear-dates[hidden] {
    display: none !important;
}

/* ── Guests, pets and Search ───────────────────────────────── */
.resly-ical-calendar .booking-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 16px 0 0;
    padding: 16px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--rc-line);
    border-radius: 0;
}
.resly-ical-calendar .booking-fields {
    display: flex;
    gap: 10px;
    width: 100%;
}
.resly-ical-calendar .booking-field {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.resly-ical-calendar .booking-controls label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rc-muted);
}
.resly-ical-calendar .guests-select,
.resly-ical-calendar .pets-select {
    width: 100% !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 34px 0 14px !important;
    font-family: 'yantramanav', sans-serif;
    font-size: 15px !important;
    line-height: 44px !important;
    color: var(--rc-text) !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b8a082' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    border: 1px solid #ddd5c9 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.resly-ical-calendar .guests-select:focus,
.resly-ical-calendar .pets-select:focus {
    outline: none;
    border-color: var(--rc-gold) !important;
    box-shadow: 0 0 0 3px rgba(var(--rc-accent-rgb, 208, 187, 154), 0.25) !important;
}

/* Dates picked but no guests yet: make the Guests box stand out */
.resly-ical-calendar .guests-hint {
    display: none;
    margin: -4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--rc-accent-text, #a2672b);
}
.resly-ical-calendar.needs-guests .guests-hint {
    display: block;
}
.resly-ical-calendar.needs-guests .guests-field label {
    color: var(--rc-accent-text, #a2672b);
}
.resly-ical-calendar.needs-guests .guests-select {
    border: 2px solid var(--rc-gold-dark) !important;
    box-shadow: 0 0 0 4px rgba(var(--rc-accent-rgb, 208, 187, 154), 0.3) !important;
    animation: rc-guests-pulse 1.6s ease-in-out 2;
}
@keyframes rc-guests-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(var(--rc-accent-rgb, 208, 187, 154), 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(var(--rc-accent-rgb, 208, 187, 154), 0.12); }
}

.resly-ical-calendar .search-button {
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    font-family: 'yantramanav', sans-serif;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    line-height: 50px !important;
    text-transform: uppercase;
    color: #fff !important;
    background: var(--rc-gold-dark) !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.resly-ical-calendar .search-button:hover:not(:disabled) {
    background: var(--rc-hover, #a68d6c) !important;
    box-shadow: 0 6px 16px rgba(var(--rc-accent-rgb, 184, 160, 130), 0.35) !important;
}
.resly-ical-calendar .search-button:disabled {
    color: #9b9488 !important;
    background: #efebe5 !important;
    cursor: default;
}

/* ── Live rates panel ──────────────────────────────────────── */
.resly-ical-calendar .rc-rates {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--rc-line);
}
.resly-ical-calendar .rc-rates[hidden] {
    display: none !important;
}
.resly-ical-calendar .rc-rates-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--rc-accent-text, #8a7556);
}
.resly-ical-calendar .rc-rates-loading,
.resly-ical-calendar .rc-rates-empty {
    padding: 6px 0 12px;
    font-size: 14px;
    color: var(--rc-muted);
}
.resly-ical-calendar .rc-rate {
    margin-bottom: 10px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e6dfd4;
    border-radius: 12px;
}
.resly-ical-calendar .rc-rate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.resly-ical-calendar .rc-rate-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-text);
}
.resly-ical-calendar .rc-rate-total {
    margin-top: 3px;
    font-size: 15px;
    font-weight: 600;
    color: var(--rc-accent-text, #8a7556);
}
.resly-ical-calendar a.rc-rate-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff !important;
    background: var(--rc-gold-dark);
    border-radius: 10px;
    text-decoration: none !important;
    transition: background 0.2s, box-shadow 0.2s;
}
.resly-ical-calendar a.rc-rate-book:hover,
.resly-ical-calendar a.rc-rate-book:focus {
    color: #fff !important;
    background: var(--rc-hover, #a68d6c);
    box-shadow: 0 6px 16px rgba(var(--rc-accent-rgb, 184, 160, 130), 0.35);
}
.resly-ical-calendar a.rc-rate-book-wide {
    display: flex;
    width: 100%;
    height: 50px;
}
.resly-ical-calendar button.rc-pol-toggle,
.resly-ical-calendar button.rc-more-toggle {
    display: inline-block;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    font: inherit;
    font-size: 13px !important;
    color: var(--rc-accent-text, #8a7556) !important;
    text-decoration: underline;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}
.resly-ical-calendar button.rc-more-toggle {
    display: block;
    margin: 0 auto 10px !important;
}
.resly-ical-calendar .rc-pol-body {
    margin-top: 10px;
    padding-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b6456;
    white-space: pre-line;
    border-top: 1px solid #eee;
}
.resly-ical-calendar .rc-pol-body[hidden],
.resly-ical-calendar .rc-more-body[hidden] {
    display: none !important;
}
.resly-ical-calendar .rc-rates-note {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--rc-muted);
}
.resly-ical-calendar .rc-rates-admin {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #8a2c0d;
    background: #fff6e5;
    border: 1px dashed #e0a43a;
    border-radius: 8px;
    word-break: break-word;
}

/* ── Small screens / narrow sidebars ──────────────────────── */
@media (max-width: 480px) {
    .resly-ical-calendar {
        padding: 22px 14px 16px;
    }
    .resly-ical-calendar .day-cell {
        height: 36px;
        font-size: 14px;
    }
}
@media (max-width: 380px) {
    .resly-ical-calendar .rc-rate-row {
        flex-direction: column;
        align-items: stretch;
    }
}
@media (prefers-reduced-motion: reduce) {
    .resly-ical-calendar * {
        transition: none !important;
        animation: none !important;
    }
}

/* Template wrapper used on NLH property pages */
.resly-availability-widget {
    margin-bottom: 24px;
}
