.woocommerce-error,
.woocommerce-shipping-fields {
    display: block !important;
}

.woocommerce .woocommerce-error .button-custom {
    float: none !important;
    margin-left: 20px;
}

.billing_wooccm_hidden {
    display: none;
}

#tr-billing_wooccm48,
#tr-billing_wooccm49 {
    display: none;
}

#billing_wooccm21_field {
    height: 81px;
}

input[type="date"] {
    height: 43px;
    border-radius: 5px !important;
    border-color: #6666 !important;
}

.woocommerce-billing-fields .wooccm-field,
.woocommerce-billing-fields .wooccm-field-first_name,
.woocommerce-billing-fields .wooccm-field-last_name {
    width: 50%;
    float: left !important;
    clear: none !important;
}

.woocommerce-shipping-fields .wooccm-field {
    width: 50% !important;
    float: left !important;
    clear: none !important;
}

#gevent-prenotazione .gevent-checkout-prenotazione {
    background: #ebe9eb;
    border-radius: 5px;
}

#gevent-prenotazione .gevent-checkout-prenotazione .form-row {
    padding: 1em;
}

.checkout .woocommerce-billing-fields .error-field {
    background-color: #f1f1f1;
    /*color: #fff;*/
    border: solid #e13030;
    border-radius: 10px;
    padding: 3px 30px;
    margin-top: 5px;
}

.selector-person-gevent {
    height: 84px;
}

.selector-person-gevent .person-gevent .a-person-event {
    float: left;
    width: 170px;
    padding: 7px;
    background-color: #32354d;
    color: #fff;
    border: solid #32354d;
    margin: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.selector-person-gevent .person-gevent {
    width: 100%;
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 10px;
}

.selector-person-gevent .person-gevent .a-person-event-selected {
    background-color: #515fc3;
    border: solid #515fc3;
}

.alert-required-fields .info-required-fields {
    width: 100%;
    background-color: #f1f1f1;
    color: #54595f;
    border: solid #f1f1f1;
    padding: 10px;
    margin-bottom: 30px;
}

#shipping_wooccm9_field {
    height: 120px;
}

.attribute-product {
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
    margin-top: 6%;
    margin-bottom: 3%;
}

.woocommerce-loop-product__title {
    min-height: 100px;
}

.elementor-2 .elementor-element.elementor-global-1939.elementor-wc-products ul.products li.product .button {
    display: flex;
    justify-content: center;
}

.woocommerce-LoopProduct-link {
    height: 470px;
}

#prenotation,
#all-events,
#all-prenotation {
    min-height: 538px;
}

#prenotation .info-prenotation,
#prenotation .info-users,
#prenotation .info-qrcode,
#prenotation .info-product {
    margin-top: 20px;
    margin-bottom: 20px;
}

#prenotation .info-qrcode {
    height: 240px;
}

#prenotation .info-users .main-user {
    width: -webkit-fill-available;
    min-height: 360px;
    margin: 15px;
    padding: 10px;
    float: left;
    background-color: #f1f1f1;
    color: #54595f;
    border: solid #c3c3c3;
}

#prenotation .info-users .main-user .name {
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 18px;
}

#prenotation .info-users .main-user .info-base {
    min-height: 290px;
}

#prenotation .info-users .main-user button {
    float: left;
    margin-right: 10px;
}

#prenotation .info-users .main-user select {
    width: 150px;
    height: 35px;
    margin-top: 1px;
    margin-bottom: 1px;
    padding: 4px 15px;
}

#prenotation .info-users .main-user input {
    width: 150px;
    height: 35px;
    margin-top: 1px;
    margin-bottom: 1px;
}

#prenotation .code-otp {
    float: left;
    width: 200px;
    margin-right: 30px;
    margin-top: 30px;
}

#prenotation .otp-code-button {
    margin-bottom: 20px;
}

#prenotation .info-product .prenotation-deleted {
    width: fit-content;
    padding: 15px;
    background-color: #f1f1f1;
    color: #54595f;
    border: solid #dd1e1e;
    font-size: 20px;
    font-weight: 600;
}

.prenotation-deleted {
    margin: 8% auto 1%;
}

.btn-gevent {
    padding: 10px;
    border-style: solid;
    border-color: var(--e-global-color-primary);
    text-decoration: unset !important;
}

#prenotation .search-prenotation {
    float: left;
    width: 50%;
    margin-top: 100px;
    text-align: center;
}

#prenotation .search-prenotation form {
    width: 350px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

#prenotation .search-prenotation button {
    width: 100%;
    margin-top: 10px;
}

#prenotation .search-prenotation h2 {
    color: var(--e-global-color-primary);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    text-transform: var(--e-global-typography-primary-text-transform);
    line-height: var(--e-global-typography-primary-line-height);
    word-spacing: var(--e-global-typography-primary-word-spacing);
}

.message-successful {
    border: 3px solid green;
    width: 200px;
    text-align: center;
    color: green;
    padding: 5px;
    margin: 5px;
    margin-left: auto;
    margin-right: auto;
}

.message-error {
    border: 3px solid red;
    width: 200px;
    text-align: center;
    color: red;
    padding: 5px;
    margin: 5px;
    margin-left: auto;
    margin-right: auto;
}

.text-reservation-inactive {
    background-color: white;
    border-radius: 5px;
    padding: 10px;
}

#prenotation {
    display: grid;
    justify-content: center;
}

.reservation-container {
    border: 2px solid #32354d;
    border-radius: 1%;
    display: grid;
    grid-template-columns: max-content;
    padding: 47px 32px;
    justify-content: center;
}

.reservation-info {
    display: flex;
    flex-direction: column;
    row-gap: 32px;
}

.detail-block {
    display: grid;
    column-gap: 16px;
    grid-template-columns: 180px max-content;
}

hr {
    border: 1px solid #ececec;
}

.reservation-detail {
    display: grid;
    flex-wrap: nowrap;
    grid-template-columns: 50% 50%;
}

.reservation-title {
    align-self: start;
    font-weight: bold;
    color: #32354d;
    font-size: 16px;
}

.reservation-text {
    align-self: start;
    text-align: start;
    max-width: 300px;
    display: flex;
    word-wrap: break-word;
    color: #32354d;
    font-size: 16px;
}

.reservation-action-buttons:has(#deleteAccreditationAdmin),
.reservation-action-buttons:has(#sendConfirmationEmailAccreditation) {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    gap: 2%;
    margin-top: 12%;
}

.reservation-action-buttons .actions:has(#deleteAccreditationAdmin),
.reservation-action-buttons .actions:has(#sendConfirmationEmailAccreditation) {
    display: flex;
    gap: 4px;
    width: unset;
    height: unset;
    margin-top: unset;
}

.btn-secondary,
#downloadQR-PDF,
#printQR-PDF,
.btn-gevent,
#main-user-action-button,
#add-guest-btn,
#save-new-guest-btn,
#cancel-new-guest-btn {
    background-color: #32354d !important;
    color: #ffffff !important;
    border-style: solid !important;
    border-color: #32354d !important;
}

.btn-secondary:hover,
#downloadQR-PDF:hover,
#printQR-PDF:hover,
.btn-gevent:hover,
#main-user-action-button:hover,
#add-guest-btn:hover,
#save-new-guest-btn:hover,
#cancel-new-guest-btn:hover {
    background-color: #ffffff !important;
    color: #32354d !important;
    border-style: solid !important;
    border-color: #32354d !important;
}

/* Keep the "Nuovo ospite" button grey when disabled */
#add-guest-btn[disabled],
#add-guest-btn[disabled]:hover {
    background-color: #808080 !important;
    border-color: #808080 !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

/* Inline spinner shown during guest save */
.em-inline-spinner {
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    flex: 0 0 14px;
    border: 2px solid #32354d;
    border-top-color: transparent;
    border-radius: 50%;
    margin-left: 0;
    vertical-align: middle;
    display: none;
    animation: em-spin 0.8s linear infinite;
}

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

button#deleteBookingBtn {
    color: #32354d !important;
    border: 0 !important;
    background-color: #ffffff !important;
    margin-top: 5% !important;
    text-decoration: underline !important;
}

button#deleteBookingBtn:hover {
    font-weight: bold;
}

.reservation-titles {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    justify-content: space-between;
}

.reservation-texts {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    justify-content: space-between;
}

.navigation-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    column-gap: 16px;
    height: max-content;
}

.reservation-action-buttons-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.reservation-action-buttons {
    flex-direction: row;
    margin: 5% auto;
}

.qr-code-container {
    margin-bottom: 5%;
}

.reservation-container:has(.reservation-deleted) .reservation-action-buttons {
    display: none;
}

.reservation-action-buttons:has(#acceptApprovalRequest) {
    flex-direction: row !important;
}

.reservation-buttons,
.pdf-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
}

#participants-title {
    margin: 5%;
    color: #32354d;
    font-size: 1.5rem;
}

.registered-users-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

#guests-container {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 32px;
    justify-content: center;
}

#guests-title {
    color: #32354d;
    margin: 5%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
}
.remove-guest-btn .fa-trash,
[id^="remove-guest-btn"] .fa-trash {
    color: #32354d;
}
#add-guest {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: small;
    flex-direction: column;
    gap: 10px;
}

.text-wrapped {
    overflow-wrap: anywhere;
    max-width: 100%;
    font-size: 14px;
}

.main-user {
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: #f1f1f1;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}
#main-user {
    margin: auto;
}

#add-new-invite,
#back-to-events-table {
    background-color: #ffffff !important;
    color: #32354d !important;
    border-style: solid !important;
    border-color: #32354d !important;
    padding: 10px;
}

#add-new-invite:hover,
#back-to-events-table:hover {
    background-color: #32354d !important;
    color: #ffffff !important;
}

.guest-card,
#guest-edit-form {
    display: inline-flex;
    flex-direction: column;
    font-size: smaller;
    max-width: 500px;
    padding: 17px;
    background: #f1f1f1;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    margin: 10px;
}

.guest-card,
#guest-edit-form button {
    margin: 2%;
}

.info-base-guest {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 8px;
}

.info-base {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 35px;
}

.info-data {
    display: flex;
    flex-direction: column;
    align-self: start;
    color: #32354d;
    font-size: 14px;
    padding: 8px;
}

.info-data label {
    font-weight: bold;
    font-size: 14px;
    padding: 3%;
}

.product-btn-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.user-actions-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 16px;
}

#guest-edit-form .user-actions-buttons {
    justify-content: center;
}

.user-actions-buttons .em-save-with-spinner {
    display: flex;
    align-items: center;
    column-gap: 8px;
}

.participants-info-container {
    display: flex;
    margin-top: 64px;
}

.participant-list-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.participant-fields-container {
    display: grid;
    grid-template-columns: auto auto;
    gap: 8px;
}

.participant-list-buttons-container {
    padding: auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 500px;
    max-width: 200px;
}

.participant-selection-button {
    padding: 8px;
    margin: 8px;
    color: #32354d;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    text-overflow: ellipsis;
    border: 1px solid #32354d;
    justify-content: center;
    line-height: normal;
    min-height: 40px;
    display: flex;
    text-align: center;
    align-items: center;
}

.participant-selection-button.participant-selected {
    background-color: #32354d;
    color: #fff;
}

.button-delete {
    margin-left: 15px;
}

.em-form-trash-button {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

#ScrollUp,
#ScrollDown {
    display: none;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f2f2f2;
    cursor: pointer;
}

.confirmation-popup p {
    margin-bottom: 10px;
}

.confirmation-popup button {
    margin-right: 10px;
}

.cancel-button {
    background-color: white !important;
    color: #32354d !important;
}

.confirmation-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    width: 400px;
    min-height: 100px;
    font-weight: 500;
    color: #32354d;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3);
}

.popup-buttons-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-button,
.delete-button {
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 5px;
}

.delete-button {
    background-color: #32354d !important;
    color: #ffffff !important;
    border-style: solid !important;
    border-color: #32354d !important;
}

.cancel-button {
    border-color: #32354d !important;
}

.cancel-button:hover,
.delete-button:hover {
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3) !important;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(56, 55, 55, 0.5);
    z-index: 9998;
}

.gevent-delete {
    color: #b32d2e;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.gevent-action {
    color: #2271b1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.actions-form-container {
    display: inline-block;
}

#ScrollUp i,
#ScrollDown i {
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}
@media screen and (min-width: 768px) {
    .participants-info-container {
        flex-direction: row;
        column-gap: 64px;
        align-items: flex-start;
    }

    .participant-list-container {
        width: 30%;
    }

    .participant-detail-container {
        flex-grow: 4;
    }
}

@media screen and (max-width: 800px) {
    .reservation-buttons,
    .pdf-buttons {
        flex-direction: column;
    }
    .registered-users-container {
        width: 100%;

        #guests-title {
            width: 100%;
            margin-left: 0px;
        }

        #guests-container {
            width: 100%;
        }

        #guests-container {
            grid-template-columns: 70%;
            justify-content: center;
        }

        .info-base {
            grid-template-columns: auto;
            margin: 16px;

            .info-data {
                overflow: auto;
                max-width: none;
            }
        }

        .guest-card,
        #guest-edit-form {
            [id^="remove-guest-btn"] {
                display: flex;
                align-self: end;
            }

            .user-actions-buttons {
                padding: 20px;
            }
        }
    }

    .form-row {
        display: flex;
        flex-direction: column;
    }

    #reCaptcha {
        margin-bottom: 45px;
    }

    .participant-info-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .participant-detail-container {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    .participant-list-buttons-container {
        margin: 15px 0px 15px 0px;
        padding: 0px;
        display: flex;
        max-height: 580px;
        align-items: center;
    }

    .participant-list-buttons-container::-webkit-scrollbar {
        display: none;
    }

    .form-row-place-order {
        width: 100% !important;
    }

    .woocommerce-billing-fields .wooccm-field {
        width: 100% !important;
        float: left !important;
        clear: none !important;
    }

    .select,
    .select2,
    .input-text,
    .select-wooccm {
        width: 148px !important;
    }

    .participant-selection-button {
        width: 75%;
    }

    .billing_wooccm_hidden,
    #billing_wooccm48 {
        display: none;
    }

    #ScrollUp,
    #ScrollDown {
        display: flex;
    }

    #ScrollUpContainer {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    #ScrollDownContainer {
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    #ParticipantsText {
        justify-content: center !important;
    }

    .confirmation-popup {
        width: 85% !important;
    }

    .reservation-container {
        display: flex;
        flex-direction: column;
        padding: 16px;
        width: 100%;
    }

    .reservation-info {
        .detail-block {
            grid-template-columns: auto auto;
        }
    }

    .qr-code-container {
        margin: 16px 0px;
    }

    .reservation-action-buttons {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin: 16px 0px;
    }
}

.main-user {
    padding: 16px;

    .info-base {
        grid-template-columns: auto;
        margin: 16px;

        .info-data {
            overflow: auto;
            max-width: none;
        }
    }
}

.participant-fields-container {
    display: flex;
    flex-direction: column;
    gap: 20px;

    .actions {
        display: flex;
        align-self: center;
        height: max-content;
        margin-bottom: 3%;
    }
}

.button-delete {
    margin: 0px 8px 0px 0px;
}

.button-text {
    margin: 0px 8px 0px 8px;
    font-size: 14px;
}

.woocommerce-NoticeGroup .woocommerce-NoticeGroup-checkout {
    width: 90%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-field .woocommerce-error {
    padding: 1em 1em 1em 1.5em;
    width: 50%;
    position: relative;
    background-color: #f7f6f7;
    color: #515151;
    border-top: 3px solid #a46497;
    width: auto;
    word-wrap: break-word;
    max-height: 80vh;
    margin-top: 11px;
}

.error-field .woocommerce-error li {
    margin-top: -2px;
    margin-bottom: 24px;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

.button-custom {
    margin-left: 20px;
    font-size: 16px;
    margin-top: 15px;
    font-weight: 800;
}

.billing_first_name_error {
    margin-top: 10px;
}

[id^="remove-guest-btn"] {
    display: flex;
    flex-direction: column;
    align-items: end;
}

#invitation {
    text-align: center;
    display: flex;
    justify-content: center;

    .info-product {
        display: flex;
        flex-direction: column;
        max-width: 60%;

        .invitation-header {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 8px;
        }

        .invitation-body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 16px;

            .code-otp {
                display: flex;
                flex-direction: column;
                gap: 8px;
                max-width: fit-content;
                align-self: center;
            }
        }
    }
}
.agent-button-container {
    text-align: left;
    margin-top: 20px;
}

.agent-button[style*="display:none;"] {
    display: none;
}

.add-new-agent-product {
    display: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 24%;
}

.add-new-agent-product h2 {
    color: #3858e9;
    font-size: 18px;
    margin-bottom: 10px;
}

.agent-error {
    margin-bottom: 10px;
    border-radius: 4px;
    padding: 10px;
}

.agent-form-element {
    margin-bottom: 10px;
}

.agent-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.add-conductor-button[style*="display:none;"] {
    display: none;
}

.add-new-agent {
    display: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 24%;
}

.add-new-agent h2 {
    color: #007bff;
    font-size: 18px;
    margin-bottom: 10px;
}

.conductor-form-element {
    margin-bottom: 10px;
}

.conductor-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

#agent_id,
#userinfo,
#agent-firstname,
#agent-lastname,
#agent-email,
#password,
#event_date,
#event_id {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

#edit-agent-btn,
#edit-agent-product-btn {
    padding: 10px 16px;
    background-color: #3858e9;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
#eventCancel,
#agentCancel {
    padding: 10px 16px;
    background-color: #b32d2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
#event_dropdown {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    height: 30px;
}
.password-toggle {
    position: relative;
}

.password-toggle input[type="password"] {
    padding-right: 30px; /* Spazio per l'icona dell'occhio */
}

.password-toggle .toggle-password {
    position: absolute;
    top: 0;
    right: 5px;
    bottom: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.saturation-icon {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    margin-top: 5px;
}

#status-buttons {
    display: none;
    justify-content: center;
    gap: 2%;
}
.main-user {
    width: 370px;
}
.icon-hover:hover {
    opacity: 0.7;
    transform: scale(1.1);
    transition:
        opacity 0.2s ease-in-out,
        transform 0.2s ease-in-out;
}

@media screen and (max-width: 480px) {
    .main-user {
        width: 289px;
    }
}
.otp-code-button:hover {
    border-color: #32354d !important;
    color: #32354d !important;
    background: #ffffff !important;
    padding: 8px 16px !important;
    font-weight: bold !important;
}

.otp-code-button {
    background-color: #32354d !important;
    color: white !important;
    font-weight: bold !important;
    border-style: solid !important;
    padding: 8px 16px !important;
    border-color: white !important;
}
