/* Palestra Reserveringsmodule - Frontend CSS */

.m2m-appointment-wrapper {
    margin: 10px 0;
}

.m2m-appointment-wrapper .filter-label {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Kalender loading state */
.m2m-ap-calendar-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 30px 0;
    color: #999;
    font-size: 14px;
}

.m2m-ap-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #eee;
    border-top-color: var(--awb-color4);
    border-radius: 50%;
    animation: m2m-spin 0.6s linear infinite;
}

@keyframes m2m-spin {
    to { transform: rotate(360deg); }
}

/* Inline kalender */
.m2m-ap-calendar-inline {
    margin-bottom: 15px;
}

.m2m-ap-calendar-inline .ui-datepicker {
    width: 100%;
    border: none;
    padding: 0;
    font-family: inherit;
    background: transparent;
}

.m2m-ap-calendar-inline .ui-datepicker-multi {
    width: 100% !important;
}

.m2m-ap-calendar-inline .ui-datepicker-multi .ui-datepicker-group {
    width: 48%;
}

/* Header: maand + navigatie */
.m2m-ap-calendar-inline .ui-datepicker-header {
    background: none;
    border: none;
    border-bottom: 2px solid var(--awb-color4);
    border-radius: 0;
    padding: 8px 0;
    margin-bottom: 4px;
}

.m2m-ap-calendar-inline .ui-datepicker-title {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

.m2m-ap-calendar-inline .ui-datepicker-prev,
.m2m-ap-calendar-inline .ui-datepicker-next {
    top: 8px;
    cursor: pointer;
}

.m2m-ap-calendar-inline .ui-datepicker-prev:hover,
.m2m-ap-calendar-inline .ui-datepicker-next:hover {
    background: none;
    border: none;
}

/* Dagnamen */
.m2m-ap-calendar-inline .ui-datepicker th {
    font-weight: 600;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    padding: 8px 0 4px;
}

/* Dagcellen */
.m2m-ap-calendar-inline .ui-datepicker td {
    padding: 1px;
}

.m2m-ap-calendar-inline .ui-datepicker table {
    width: 100%;
}

.m2m-ap-calendar-inline .ui-datepicker td a,
.m2m-ap-calendar-inline .ui-datepicker td span {
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    border: none !important;
    background: #f5f2ed;
    color: #1a1a1a;
    font-size: 14px;
    transition: background 0.15s ease;
}

/* Beschikbare dag hover */
.m2m-ap-calendar-inline .ui-datepicker td a:hover {
    background: color-mix(in srgb, var(--awb-color4) 20%, transparent);
    color: #1a1a1a;
}

/* Geselecteerde dag */
.m2m-ap-calendar-inline .ui-datepicker td a.ui-state-active {
    background: var(--awb-color4);
    color: #fff;
    font-weight: 700;
}

/* Vandaag */
.m2m-ap-calendar-inline .ui-datepicker td a.ui-state-highlight {
    border: 2px solid var(--awb-color4);
    background: #fff;
    color: #1a1a1a;
}

/* Niet-beschikbare dag */
.m2m-ap-calendar-inline .ui-datepicker td .ui-state-disabled span {
    background: transparent;
    color: #ccc;
}

/* Handmatig uitgeschakelde datum (feestdag/sluitingsdag) */
.m2m-ap-calendar-inline .ui-datepicker td.blocked span {
    color: #c0392b;
    text-decoration: line-through;
    opacity: 0.7;
}

/* Badkledingdag - eerste woensdag van de maand */
.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-swimwear-day a {
    background: #c7ecff;
    color: #144a8a;
    font-weight: 700;
    position: relative;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-swimwear-day a:hover {
    background: #b0e0fb;
    color: #144a8a;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-swimwear-day a::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1e6fd6;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-swimwear-day a.ui-state-active {
    background: #1e6fd6;
    color: #fff;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-swimwear-day a.ui-state-active::after {
    background: #fff;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day a {
    background: #ffe6b8;
    color: #8a5300;
    font-weight: 700;
    position: relative;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day a:hover {
    background: #ffd98f;
    color: #8a5300;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day span {
    position: relative;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day a::after,
.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day span::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8c00;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day a.ui-state-active {
    background: #e08a00;
    color: #fff;
}

.m2m-ap-calendar-inline .ui-datepicker td.m2m-ap-sunday-day a.ui-state-active::after {
    background: #fff;
}

@media (max-width: 768px) {
    .m2m-ap-calendar-inline .ui-datepicker-multi .ui-datepicker-group {
        width: 100%;
    }
}

/* Legenda onder kalender */
.m2m-ap-calendar-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 10px;
    font-size: 12px;
    color: #555;
}

.m2m-ap-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
}

.m2m-ap-legend-swatch--swimwear {
    background: #e7f1fb;
}

.m2m-ap-legend-swatch--swimwear::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1e6fd6;
}

.m2m-ap-legend-swatch--sunday {
    background: #ffe6b8;
}

.m2m-ap-legend-swatch--sunday::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff8c00;
}

/* Badkledingdag melding */
.m2m-ap-swimwear-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #e7f1fb;
    border-left: 4px solid #1e6fd6;
    color: #144a8a;
    padding: 10px 14px;
    margin: 10px 0 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.m2m-ap-swimwear-notice-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1e6fd6;
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
    font-size: 13px;
}

.m2m-ap-swimwear-notice-icon::before {
    content: 'i';
    font-style: italic;
}

.m2m-ap-sunday-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff4e0;
    border-left: 4px solid #e08a00;
    color: #8a5300;
    padding: 10px 14px;
    margin: 10px 0 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.m2m-ap-sunday-notice-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e08a00;
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
    font-size: 13px;
}

.m2m-ap-sunday-notice-icon::before {
    content: 'i';
    font-style: italic;
}

/* Beschikbaarheidsindicator - subtiel */
.m2m-ap-availability {
    margin: 4px 0 15px;
}

.m2m-ap-availability-text.open {
    color: var(--awb-color4);
    font-weight: 600;
    font-size: 14px;
}

.m2m-ap-availability-text.open::before {
    content: '\2713 ';
}

.m2m-ap-availability-text.full {
    color: #cc0000;
    font-weight: 600;
    font-size: 14px;
}

.m2m-ap-availability-text.full::before {
    content: '\2717 ';
}

/* Pakketkeuze - kaart-layout */
.m2m-ap-packages {
    margin: 15px 0;
}

.m2m-ap-packages input[type="radio"] {
    display: none;
}

.m2m-ap-package-option {
    margin-bottom: 2px;
}

.m2m-ap-package-label {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #f5f2ed;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 14px;
}

.m2m-ap-package-label:hover {
    background: #ebe7e0;
}

/* Radio circle */
.m2m-ap-package-radio {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #999;
    background: #fff;
    position: relative;
    transition: border-color 0.2s ease;
}

.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-radio {
    border-color: var(--awb-color4);
}

.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-radio::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--awb-color4);
}

/* Package info */
.m2m-ap-package-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.m2m-ap-package-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

.m2m-ap-package-time {
    font-size: 13px;
    color: #666;
}

/* Price */
.m2m-ap-package-price {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--awb-color4);
    font-weight: 600;
    white-space: nowrap;
}

/* Selected state */
.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label {
    background: var(--awb-color4);
}

.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-name,
.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-time,
.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-price {
    color: #fff;
}

.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-radio {
    border-color: #fff;
}

.m2m-ap-packages input[type="radio"]:checked + .m2m-ap-package-label .m2m-ap-package-radio::after {
    background: #fff;
}

/* Step 2: blur tot pakket is geselecteerd */
.step-2 {
    opacity: 0.35;
    filter: blur(2px);
    pointer-events: none;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.step-2.active {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

/* Override Avada/theme label styling */
.contact-us-form .m2m-appointment-wrapper label:before {
    content: none;
}

.m2m-appointment-wrapper .m2m-ap-package-label::before {
    content: none !important;
}

/* Bungalownummer veld (alleen zichtbaar bij parkgast/entree) */
.m2m-ap-bungalow-field {
    margin: 12px 0 15px;
    padding: 12px 14px;
    background: #f5f2ed;
    border-radius: 4px;
}

.m2m-ap-bungalow-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.m2m-ap-bungalow-required {
    color: #cc0000;
    margin-left: 2px;
}

.m2m-ap-bungalow-field input[type="text"] {
    width: 100%;
    max-width: 220px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

.m2m-ap-bungalow-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.m2m-ap-arrival-field {
    margin: 12px 0 15px;
    padding: 12px 14px;
    background: #f5f2ed;
    border-radius: 4px;
}

.m2m-ap-arrival-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.m2m-ap-arrival-required {
    color: #cc0000;
    margin-left: 2px;
}

.m2m-ap-arrival-field input[type="time"] {
    width: 100%;
    max-width: 220px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

.m2m-ap-arrival-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}
