/**
 * Clean styling for booking-confirmation privacy/terms checkboxes
 * Fixes #41: ugly oversized checkbox; #40: prevents WC default terms duplication via spacing
 */

/* Container around the checkbox */
.booking-registration-field .checkboxes {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 12px 0;
    background: transparent;
    border: 0;
}

/* The actual checkbox input */
.booking-registration-field .checkboxes input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    border: 2px solid #01024d;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    transition: background-color .15s ease, border-color .15s ease;
}

.booking-registration-field .checkboxes input[type="checkbox"]:hover {
    border-color: #01024d;
    background: #f6f7ff;
}

.booking-registration-field .checkboxes input[type="checkbox"]:checked {
    background: #01024d;
    border-color: #01024d;
}

.booking-registration-field .checkboxes input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* The label next to the checkbox */
.booking-registration-field .checkboxes label {
    margin: 0;
    padding: 0;
    color: #01024d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
}

.booking-registration-field .checkboxes label a {
    color: #01024d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.booking-registration-field .checkboxes label a:hover {
    color: #4045a8;
}

/* Override Listeo's default oversized checkbox skin (the "fancy" SVG variant) */
.booking-registration-field .checkboxes label::before,
.booking-registration-field .checkboxes label::after {
    display: none !important;
}

/* Error highlight from booking validation JS */
.booking-registration-field .checkboxes input.field-error-highlight {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .15);
}

/* ============================================================
 * Booking Confirmation page: Listeo's privacy_policy checkbox
 * (rendered as <p class="form-row checkboxes">)
 * ============================================================ */
p.checkboxes,
.form-row.checkboxes {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 12px 0;
    background: transparent;
    border: 0;
}

p.checkboxes input[type="checkbox"],
.form-row.checkboxes input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #01024d;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}

p.checkboxes input[type="checkbox"]:checked,
.form-row.checkboxes input[type="checkbox"]:checked {
    background: #01024d;
    border-color: #01024d;
}

p.checkboxes input[type="checkbox"]:checked::after,
.form-row.checkboxes input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

p.checkboxes label,
.form-row.checkboxes label {
    margin: 0;
    color: #01024d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
}

p.checkboxes label::before,
p.checkboxes label::after,
.form-row.checkboxes label::before,
.form-row.checkboxes label::after {
    display: none !important;
}

/* ============================================================
 * Boat Request Form modal: consent checkbox (the "big & ugly" one)
 * Selectors: .boat-request-checkbox-label, .checkbox-text, .boat-request-consent
 * ============================================================ */
.boat-request-consent .boat-request-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #01024d;
    font-weight: 500;
    cursor: pointer;
}

.boat-request-consent input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    border: 2px solid #01024d;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 1px 0 0 0;
    padding: 0;
}

.boat-request-consent input[type="checkbox"]:checked {
    background: #01024d;
    border-color: #01024d;
}

.boat-request-consent input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.boat-request-consent .checkbox-text {
    color: #01024d;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.boat-request-consent .checkbox-text a {
    color: #01024d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================================
 * Booking Confirmation: consolidated Privacy + Terms + Cancellation
 * (kymma-checkout-terms — replaces 2 separate ugly checkboxes)
 * ============================================================ */
.kymma-checkout-terms {
    margin: 16px 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.kymma-terms-checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.45;
    color: #01024d;
    font-weight: 500;
}

.kymma-terms-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    border: 2px solid #01024d;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 1px 0 0 0;
    padding: 0;
    transition: background-color .15s ease, border-color .15s ease;
}

.kymma-terms-checkbox input[type="checkbox"]:hover {
    background: #f6f7ff;
}

.kymma-terms-checkbox input[type="checkbox"]:checked {
    background: #01024d;
    border-color: #01024d;
}

.kymma-terms-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.kymma-terms-text {
    flex: 1;
}

.kymma-terms-text a {
    color: #01024d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kymma-terms-text a:hover { color: #4045a8; }

/* Override label::before/::after that some themes inject */
.kymma-terms-checkbox::before,
.kymma-terms-checkbox::after { display: none !important; }

/* ============================================================
 * Cancellation policy notice — placed BELOW the Confirm & Pay
 * button (per client feedback #39).
 * ============================================================ */
.kymma-cancellation-notice {
    margin: 18px 0 8px;
    padding: 12px 14px;
    background: #f6f7ff;
    border-left: 3px solid #01024d;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #01024d;
}

.kymma-cancellation-notice p {
    margin: 0;
}

.kymma-cancellation-notice a {
    color: #01024d;
    text-decoration: underline;
}

.kymma-cancel-info-icon {
    cursor: help;
    position: relative;
    display: inline-block;
    margin-left: 4px;
    font-size: 14px;
}

.kymma-cancel-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: 130%;
    z-index: 999;
    background: #fff;
    border: 1px solid #d8d8e6;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6;
    width: 360px;
    box-shadow: 0 4px 14px rgba(1, 2, 77, .15);
    white-space: normal;
    color: #01024d;
}

.kymma-cancel-info-icon:hover .kymma-cancel-tooltip,
.kymma-cancel-info-icon:focus-within .kymma-cancel-tooltip {
    display: block;
}

/* #36: Coupon field too early — hide Listeo coupon on booking-confirmation (shows again later at WooCommerce checkout step) */
.page-template-template-booking-confirmation .booking-confirmation-coupons,
body.page .booking-confirmation-coupons { display: none !important; }

