/* Event Registration Form Styles */

/* Registration Count Display */
.event-reg-count {
    text-align: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #7b142e 0%, #004063 100%);
    color: #ffffff;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(123, 20, 46, 0.3);
}

.event-reg-count-number {
    font-size: 32px;
    font-weight: 700;
    color: #ffd700;
    margin-left: 5px;
}

.event-reg-container {
    max-width: 80%;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
}

.event-reg-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
}

.event-reg-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.event-reg-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.event-reg-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Row-based layout */
.event-reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.event-reg-row-full {
    grid-template-columns: 1fr;
}

@media (max-width: 768px) {
    .event-reg-row {
        grid-template-columns: 1fr;
    }
}

.event-reg-form-group {
    margin-bottom: 0;
    position: relative;
}

.event-reg-form-group label {
    display: block;
    margin-bottom: 13px;
    font-weight: 600;
    color: #7b142e;
    font-size: 20px;
}

.event-reg-form-group .required {
    color: #e74c3c;
}

.event-reg-form-group input[type="text"],
.event-reg-form-group input[type="email"],
.event-reg-form-group input[type="tel"],
.event-reg-form-group select.event-reg-select {
    width: 100%;
    padding: 12px 26px;
    border: 1px solid #ddd;
    border-radius: 91px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    height: 60px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.event-reg-form-group select.event-reg-select {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23780c2a"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 24px;
    cursor: pointer;
    
    width: 100%;
    padding: 12px 26px;
    border: 1px solid #ddd;
    border-radius: 91px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    height: 60px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.event-reg-select{
    width: 100% !important;
    padding: 12px 26px !important;
    border: 1px solid #ddd !important;
    border-radius: 91px !important;
    font-size: 16px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
    height: 60px !important;
    background-color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
        line-height: 33px !important;
    
}

.event-reg-form-group select.event-reg-select:focus {
    outline: none;
    border-color: #780c2a;
    box-shadow: 0 0 0 3px rgba(120, 12, 42, 0.1);
}

/* Custom Scrollable Dropdown Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 26px;
    border: 1px solid #ddd;
    border-radius: 91px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
    height: 60px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-select-trigger:hover {
    border-color: #780c2a;
}

.custom-select-trigger.active {
    border-color: #780c2a;
    box-shadow: 0 0 0 3px rgba(120, 12, 42, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-value {
    color: #333;
    flex: 1;
}

.custom-select-value.placeholder {
    color: #999;
}

.custom-select-arrow {
    color: #780c2a;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.custom-select-trigger.active .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #780c2a;
    border-top: none;
    border-radius: 0 0 20px 20px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.custom-select-options.open {
    display: block;
}

.custom-select-option {
    padding: 12px 26px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.custom-select-option:hover {
    background-color: #f8f0f2;
    color: #780c2a;
}

.custom-select-option.selected {
    background-color: #780c2a;
    color: #fff;
}

.custom-select-option:last-child {
    border-radius: 0 0 20px 20px;
}

/* Custom scrollbar for dropdown */
.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #780c2a;
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #5a0a20;
}

/* Phone Input with Country Selector */
.phone-input-wrapper {
    display: flex;
    gap: 0;
    width: 100%;
}

.country-select-wrapper {
    position: relative;
    flex-shrink: 0;
}

.country-select-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 12px 12px 16px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 91px 0 0 91px;
    background-color: #f8f9fa;
    cursor: pointer;
    height: 60px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    min-width: 110px;
}

.country-select-trigger:hover {
    background-color: #f0f0f0;
    border-color: #780c2a;
}

.country-select-trigger.active {
    border-color: #780c2a;
    background-color: #fff;
}

.country-select-trigger .country-flag {
    font-size: 24px;
    line-height: 1;
}

.country-select-trigger .country-code {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.country-select-trigger .country-arrow {
    font-size: 10px;
    color: #780c2a;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.country-select-trigger.active .country-arrow {
    transform: rotate(180deg);
}

.country-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 280px;
    background: #fff;
    border: 1px solid #780c2a;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.country-select-options.open {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.country-option:hover {
    background-color: #f8f0f2;
}

.country-option.selected {
    background-color: #780c2a;
    color: #fff;
}

.country-option.selected .country-dial {
    color: #ffd700;
}

.country-option .country-flag {
    font-size: 22px;
    line-height: 1;
}

.country-option .country-name {
    flex: 1;
    font-size: 14px;
}

.country-option .country-dial {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.country-option:last-child {
    border-radius: 0 0 15px 15px;
}

/* Country dropdown scrollbar */
.country-select-options::-webkit-scrollbar {
    width: 6px;
}

.country-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.country-select-options::-webkit-scrollbar-thumb {
    background: #780c2a;
    border-radius: 3px;
}

/* Phone input field adjustment */
.phone-input-wrapper input[type="tel"] {
    flex: 1;
    padding: 12px 26px 12px 16px;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 91px 91px 0;
    font-size: 16px;
    height: 60px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.phone-input-wrapper input[type="tel"]:focus {
    outline: none;
    border-color: #780c2a;
    box-shadow: 0 0 0 3px rgba(120, 12, 42, 0.1);
}

.phone-input-wrapper input[type="tel"].field-valid {
    border-color: #28a745;
}

.phone-input-wrapper input[type="tel"].field-error {
    border-color: #dc3545;
}

#other-district-wrapper input {
    width: 100%;
    padding: 12px 26px;
    border: 1px solid #ddd;
    border-radius: 91px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    height: 60px;
}

#other-district-wrapper input:focus {
    outline: none;
    border-color: #780c2a;
    box-shadow: 0 0 0 3px rgba(120, 12, 42, 0.1);
}

.event-reg-form-group input:focus {
    outline: none;
    border-color: #780c2a;
    box-shadow: 0 0 0 3px rgba(120, 12, 42, 0.1);
}

/* Registration Type Selector */
.event-reg-type-selector {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.event-reg-type-selector > label {
    margin-bottom: 20px;
    font-size: 22px;
}

.radio-group {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 15px 30px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
    font-size: 18px !important;
}

.radio-label:hover {
    border-color: #780c2a;
    background: #fff9fa;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    background: #780c2a;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #780c2a;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label input[type="radio"]:checked ~ .radio-text {
    color: #780c2a;
    font-weight: 700;
}

.radio-text {
    font-weight: 600;
    color: #333;
}

/* Inline Radio Buttons for Food Choice and Transport */
.event-reg-radio-section {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.event-reg-radio-section > label {
    margin-bottom: 15px;
    font-size: 18px;
}

.radio-group-inline {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.radio-label-inline {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 12px 25px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 30px;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
    font-size: 16px !important;
}

.radio-label-inline:hover {
    border-color: #780c2a;
    background: #fff9fa;
}

.radio-label-inline input[type="radio"] {
    display: none;
}

.radio-custom-inline {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-custom-inline::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: #780c2a;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.radio-label-inline input[type="radio"]:checked + .radio-custom-inline {
    border-color: #780c2a;
}

.radio-label-inline input[type="radio"]:checked + .radio-custom-inline::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label-inline input[type="radio"]:checked ~ .radio-text {
    color: #780c2a;
    font-weight: 700;
}

/* Checkbox Container Styling */
.event-reg-checkbox-container {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.checkbox-wrapper {
    padding-top: 5px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #780c2a;
    border-color: #780c2a;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-text {
    font-size: 16px;
    color: #333;
}

/* Field validation states */
.event-reg-form-group input.field-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.event-reg-form-group input.field-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.event-reg-form-group input.field-valid {
    border-color: #28a745;
}

.event-reg-form-group input.field-valid:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.event-reg-form-group input.validating {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="35" stroke="%23780c2a" stroke-width="8" fill="none" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1s" repeatCount="indefinite"/><animate attributeName="stroke-dasharray" values="0 220;110 110;0 220" dur="1s" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 25px;
}

.field-error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 26px;
}

.field-success {
    display: block;
    color: #28a745;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 26px;
    font-weight: 600;
}

.field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding-left: 26px;
}

.field-hint a {
    color: #780c2a;
    text-decoration: underline;
    font-weight: 600;
}

.field-hint a:hover {
    color: #004063;
}

/* Member-only fields animation */
.member-only-field {
    transition: all 0.3s ease;
}

/* Checkbox styles */
.event-reg-checkbox {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
}

.event-reg-checkbox label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
}

.event-reg-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

/* Terms & Conditions section */
.event-reg-terms {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.terms-content {
    max-height: 150px;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
}

.terms-content::-webkit-scrollbar {
    width: 8px;
}

.terms-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.terms-content p {
    margin: 0 0 10px 0;
}

.terms-content p:last-child {
    margin-bottom: 0;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    margin-bottom: 0 !important;
    font-size: 16px !important;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #780c2a;
}

.terms-checkbox span {
    user-select: none;
}

/* reCAPTCHA section */
.event-reg-recaptcha {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.event-reg-recaptcha .g-recaptcha {
    transform-origin: center;
}

/* Button group */
.event-reg-form-group.button-group {
    grid-column: 1 / -1;
    text-align: right;
}

.event-reg-submit-btn {
    padding: 15px 50px;
    background: #004063;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, opacity 0.3s ease;
    display: inline-block;
}

.event-reg-submit-btn:hover:not(:disabled) {
    background: #780c2a;
}

.event-reg-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Thank You Message */
.event-reg-thank-you {
    text-align: center;
    padding: 40px 20px;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    color: white;
    font-size: 50px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.event-reg-thank-you h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
}

.event-reg-thank-you p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.registration-id {
    font-size: 18px;
    margin-top: 20px;
}

.registration-id strong {
    color: #4CAF50;
    font-size: 20px;
}

.email-notice {
    font-style: italic;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-reg-container {
        max-width: 95%;
        padding: 20px;
    }
    
    .event-reg-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .event-reg-type-selector,
    .event-reg-checkbox,
    .event-reg-terms,
    .event-reg-recaptcha,
    .event-reg-form-group.button-group {
        grid-column: 1;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .radio-label {
        justify-content: center;
    }
    
    .event-reg-form-group.button-group {
        text-align: center;
    }
    
    .event-reg-submit-btn {
        width: 100%;
    }
    
    .event-reg-form-group input[type="text"],
    .event-reg-form-group input[type="email"],
    .event-reg-form-group input[type="tel"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .terms-content {
        max-height: 120px;
    }
    
    .event-reg-recaptcha .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }
}

@media (max-width: 480px) {
    .event-reg-container {
        padding: 15px;
    }
    
    .event-reg-form-group label {
        font-size: 16px;
    }
    
    .event-reg-type-selector > label {
        font-size: 18px;
    }
    
    .radio-label {
        font-size: 16px !important;
        padding: 12px 20px;
    }
    
    .terms-checkbox {
        font-size: 14px !important;
    }
    
    .event-reg-recaptcha .g-recaptcha {
        transform: scale(0.85);
    }
}
