/* Emergency Checkbox Fix - Ultra High Specificity */
/* This file contains aggressive CSS overrides to ensure checkbox functionality */

/* Target the specific terms checkbox with maximum specificity */
body .tztripplan-container input[type="checkbox"]#terms,
body .elementor-widget-container .tztripplan-container input[type="checkbox"]#terms,
body .elementor-section .tztripplan-container input[type="checkbox"]#terms,
body .elementor-column .tztripplan-container input[type="checkbox"]#terms,
body div .tztripplan-container input[type="checkbox"]#terms {
    width: 18px !important;
    height: 18px !important;
    margin: 0 8px 0 0 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 3px !important;
    outline: none !important;
    z-index: 9999 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    min-width: 18px !important;
    min-height: 18px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    clip: auto !important;
    overflow: visible !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
    clear: none !important;
    text-indent: 0 !important;
    font-size: 16px !important;
    line-height: normal !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    empty-cells: show !important;
    caption-side: top !important;
    list-style: none !important;
    quotes: none !important;
    content: normal !important;
    counter-reset: none !important;
    counter-increment: none !important;
    resize: none !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    touch-action: auto !important;
    -webkit-touch-callout: default !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
}

/* Override common theme patterns that break checkboxes */

/* Astra theme fixes */
.ast-container .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* GeneratePress theme fixes */
.inside-article .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* OceanWP theme fixes */
.entry-content .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* Avada theme fixes */
.fusion-body .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* Divi theme fixes */
.et_pb_section .tztripplan-container input[type="checkbox"]#terms,
.et_pb_column .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* Bootstrap framework fixes */
.container .tztripplan-container input[type="checkbox"]#terms,
.container-fluid .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* Foundation framework fixes */
.row .tztripplan-container input[type="checkbox"]#terms,
.column .tztripplan-container input[type="checkbox"]#terms,
.columns .tztripplan-container input[type="checkbox"]#terms {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
}

/* Generic CSS reset overrides */
* .tztripplan-container input[type="checkbox"]#terms {
    box-sizing: border-box !important;
}

/* Ensure label is also clickable */
body .tztripplan-container .checkbox-label,
body .tztripplan-container label[for="terms"] {
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Force checkbox to be above any overlays */
body .tztripplan-container input[type="checkbox"]#terms::before,
body .tztripplan-container input[type="checkbox"]#terms::after {
    display: none !important;
    content: none !important;
}

/* Prevent any pseudo-elements from blocking clicks */
body .tztripplan-container .checkbox-label::before,
body .tztripplan-container .checkbox-label::after {
    pointer-events: none !important;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    body .tztripplan-container input[type="checkbox"]#terms {
        min-width: 20px !important;
        min-height: 20px !important;
        width: 20px !important;
        height: 20px !important;
        touch-action: manipulation !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body .tztripplan-container input[type="checkbox"]#terms {
        border: 2px solid currentColor !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    body .tztripplan-container input[type="checkbox"]#terms {
        transition: none !important;
        animation: none !important;
    }
}

/* Print styles */
@media print {
    body .tztripplan-container input[type="checkbox"]#terms {
        -webkit-appearance: checkbox !important;
        appearance: checkbox !important;
        color-adjust: exact !important;
    }
}