/*
 * Tarbut Registration — enrollment / choose-a-child UI styles.
 * Moved here from the dooble theme's style.css (2026-07) so the enrollment UI
 * is self-contained and survives the theme's eventual retirement.
 */

/* ---- Kids list (product page + my-account + checkout) ---- */
.kids-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kids-list input[type="checkbox"] + label {
    font-size: 21px;
}

.single-product .kids-list {
    margin: 10px 0;
}

.kids-list .kids-list-item {
    position: relative;
    width: 100%;
    padding: 10px 20px;
    border: 1px solid #82d4ab;
}

.kids-list .kids-list-item.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.kids-list .kids-list-item .kid-content .kid-details {
    display: none;
}

.kids-list .kids-list-item .kid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.kids-list .kids-list-item .kid-header .kid-name {
    width: 80%;
}

.kids-list .kids-list-item .kid-header .kid-name .label {
    font-weight: 700;
}

.kids-list .kids-list-item .kid-content .edit-a-kid-wrapper {
    display: none;
}

.woocommerce-account .kids-list .kids-list-item .kid-header .kid-name input[type="checkbox"] {
    display: none;
}

.kids-list .kids-list-item .kid-header .actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    width: 20%;
}

.kids-list .kids-list-item .kid-header .actions img {
    max-width: 30px;
    padding: 5px;
    cursor: pointer;
}

.kids-list .kids-list-item .kid-content .label {
    font-weight: 700;
}

.product-kids-list h3 {
    margin: 10px 0;
    font-size: 20px;
}

.woocommerce-checkout .kids-list {
    gap: 10px;
}

.woocommerce-checkout .kids-list .kids-list-item {
    padding: 10px 20px;
}

/* ---- Add / edit kid forms ---- */
.add-kid-to-parent-toggle {
    margin: 30px 0 20px 0;
    text-decoration: underline;
    cursor: pointer;
}

#form-add-kid-to-parent {
    display: none;
    padding: 20px;
    border: 1px solid #cccccc;
}

#form-add-kid-to-parent input[type="radio"] {
    -webkit-appearance: radio;
    -moz-appearance: radio;
    appearance: radio;
    display: inline-block;
}

#form-add-kid-to-parent input[type="checkbox"] {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
    display: inline-block;
}

.form-edit-kid .form-group,
#form-add-kid-to-parent .form-group {
    position: relative;
    margin-bottom: 10px;
}

.form-edit-kid .form-group > div.label,
#form-add-kid-to-parent .form-group > div.label {
    width: 100%;
    font-weight: 700;
}

.form-edit-kid .form-group label,
#form-add-kid-to-parent .form-group label {
    width: 100%;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.form-edit-kid .form-group label[for="ek-allergies-yes"],
.form-edit-kid .form-group label[for="ek-allergies-no"] {
    padding: 10px;
    border: 2px solid black;
}

.form-edit-kid .form-group input:checked ~ label[for="ek-allergies-yes"],
.form-edit-kid .form-group input:checked ~ label[for="ek-allergies-no"] {
    background-color: #430047;
    color: white;
}

.form-edit-kid .form-group label small {
    font-size: 14px;
}

.form-edit-kid .form-group .no-margins,
#form-add-kid-to-parent .form-group .no-margins {
    margin: 0;
}

.form-edit-kid .form-group .inline-flex,
#form-add-kid-to-parent .form-group .inline-flex {
    display: inline-flex;
}

.form-edit-kid .form-group input,
.form-edit-kid .form-group select,
.form-edit-kid .form-group textarea,
#form-add-kid-to-parent .form-group input,
#form-add-kid-to-parent .form-group select,
#form-add-kid-to-parent .form-group textarea {
    width: 100%;
    background-color: white;
}

#form-add-kid-to-parent .form-group input[name="ak_birthday"],
.form-edit-kid .form-group input[name="ak_birthday"] {
    height: 40px;
}

.form-edit-kid .form-group input:not([type="radio"]):read-only {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-edit-kid .errors .message,
#form-add-kid-to-parent .errors .message {
    margin-top: 20px;
}

.form-edit-kid.loading::before,
#form-add-kid-to-parent.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.ek-allergies-description-wrapper {
    display: none;
}

.product-terms-and-conditions {
    display: block;
    width: 100%;
    margin-top: 10px;
}

/* ---- Terms & conditions popup (acceptance PDF) ---- */
#terms-and-conditions-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    border-radius: 10px;
}

#terms-and-conditions-popup h2 {
    margin-top: 0;
}

#terms-and-conditions-popup .terms-and-conditions-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

#terms-and-conditions-popup .product-terms-and-conditions-item {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#terms-and-conditions-popup .product-terms-and-conditions-item embed {
    width: 100%;
    height: 500px;
    object-fit: contain;
}

#terms-and-conditions-popup .terms-and-conditions-close {
    position: absolute;
    top: 10px;
    left: 15px;
    background: transparent;
    border: none;
    font-size: 48px;
    cursor: pointer;
    color: #333333;
}

@media (max-width: 1024px) {
    #terms-and-conditions-popup {
        width: 100%;
    }
}
