.attendee-fields {
    margin: 20px 0;
}

.attendee-field-group {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.attendee-field-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.woocommerce .attendee-field-group .form-row {
    margin-bottom: 5px;
}

.woocommerce .attendee-field-group .form-row label {
    display: block;
    margin-top: 0;
    margin-bottom: 5px;
    line-height: 1.45;
    font-size: 18px;
}

.woocommerce .attendee-field-group .form-row input[type="text"],
.woocommerce .attendee-field-group .form-row input[type="email"],
.woocommerce .attendee-field-group .form-row textarea {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    height: 38px;
}

.woocommerce .attendee-field-group .form-row textarea {
    min-height: 80px;
    height: auto;
}

.attendee-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0;
}

.attendee-grid-row {
    display: flex;
    gap: 15px;
}

.attendee-grid-col {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
}

.attendee-field.error {
    border: 2px solid #dc3232 !important;
    background-color: #fff8f8 !important;
}

.attendee-field.error:focus {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

.form-row.error label {
    color: #dc3232;
}

.form-row.error .error-message {
    color: #dc3232;
    font-size: 0.85em;
    margin-top: 4px;
    display: block;
}

.form-row.error .required {
    color: #dc3232;
}

/* Add transition for smooth state changes */
.attendee-field {
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Improve focus states */
.attendee-field:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Improve checkbox styling */
.form-row input[type="checkbox"].attendee-field {
    margin-right: 8px;
}

.form-row label.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

@media (max-width: 768px) {
    .attendee-grid-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* Admin styles */
.attendee-details-admin {
    margin: 15px 0;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #ddd;
}

.attendee-table {
    border-collapse: collapse;
    margin-top: 10px;
}

.attendee-table th,
.attendee-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.attendee-table th {
    background: #f1f1f1;
    font-weight: bold;
}

.attendee-table tr:nth-child(even) {
    background: #f9f9f9;
}

.attendee-table tr:hover {
    background: #f5f5f5;
} 

.styled-checkbox {
    position: absolute;
    opacity: 0;
}
.styled-checkbox + label {
    position: relative;
    cursor: pointer;
    padding: 0;
}
.styled-checkbox + label:before {
    content: "";
    margin-right: 10px;
    display: inline-block;
    vertical-align: text-top;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 4px;
    border: var(--wc-form-border-width) solid var(--wc-form-border-color);
}
.styled-checkbox:hover + label:before {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.styled-checkbox:focus + label:before {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.styled-checkbox:checked + label:before {
    background: #558E0A;
}
.styled-checkbox:disabled + label {
    color: #b8b8b8;
    cursor: auto;
}
.styled-checkbox:disabled + label:before {
    box-shadow: none;
    background: #ddd;
}
.styled-checkbox:checked + label:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 9px;
    background: white;
    width: 2px;
    height: 2px;
    box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
    transform: rotate(45deg);
}