/* Event Booth Registration - Card Styles
   ---------------------------------------------------------
   This form is often embedded inside page builder sections
   (Elementor, Divi, block themes, etc.) whose global button/
   input/heading styles otherwise bleed in and override ours
   (e.g. green dropdowns, purple buttons, oversized headings).
   The block below resets every element inside .ebr-wrapper to
   the browser default before our own rules apply, so the
   widget renders consistently no matter what theme it sits in.
--------------------------------------------------------- */

.ebr-wrapper,
.ebr-wrapper * {
    all: revert;
    box-sizing: border-box !important;
}

.ebr-wrapper {
    --ebr-accent: #f97316;
    --ebr-accent-dark: #ea580c;
    --ebr-text: #1f2937;
    --ebr-muted: #6b7280;
    --ebr-border: #e5e7eb;
    --ebr-error: #ef4444;
    --ebr-success: #16a34a;
    --ebr-bg: #ffffff;
    --ebr-radius: 12px;

    display: block;
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ebr-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background-color: var(--ebr-bg) !important;
    background-image: none !important;
    border-radius: 20px;
    padding: clamp(28px, 5vw, 44px) clamp(24px, 4.5vw, 40px) clamp(30px, 5vw, 46px);
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.10), 0 3px 8px rgba(17, 24, 39, 0.06);
    animation: ebrFadeIn 0.4s ease;
}

@keyframes ebrFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ebr-badge {
    display: inline-block;
    background-color: var(--ebr-accent) !important;
    background-image: none !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 7px 16px !important;
    border-radius: 999px !important;
    margin: 0 0 14px 0 !important;
    border: none !important;
}

.ebr-heading {
    display: block !important;
    margin: 0 0 8px 0 !important;
    font-size: 25px !important;
    font-weight: 800 !important;
    color: var(--ebr-text) !important;
    line-height: 1.25 !important;
    font-family: inherit !important;
}

.ebr-subtext {
    display: block !important;
    margin: 0 0 26px 0 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    color: var(--ebr-muted) !important;
    font-family: inherit !important;
}

.ebr-form-message {
    display: block;
    padding: 12px 14px !important;
    border-radius: var(--ebr-radius) !important;
    font-size: 14px !important;
    margin: 0 0 18px 0 !important;
    animation: ebrFadeIn 0.3s ease;
}

.ebr-form-message.ebr-success {
    background-color: #ecfdf5 !important;
    color: var(--ebr-success) !important;
    border: 1px solid #a7f3d0 !important;
}

.ebr-form-message.ebr-error {
    background-color: #fef2f2 !important;
    color: var(--ebr-error) !important;
    border: 1px solid #fecaca !important;
}

.ebr-field {
    display: block;
    margin: 0 0 18px 0 !important;
}

.ebr-field label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--ebr-text) !important;
    margin: 0 0 7px 0 !important;
    font-family: inherit !important;
}

.ebr-required {
    color: var(--ebr-error) !important;
}

.ebr-field input[type="text"],
.ebr-field input[type="email"],
.ebr-field input[type="tel"],
.ebr-field select {
    display: block !important;
    width: 100% !important;
    padding: 13px 15px !important;
    font-size: 15.5px !important;
    font-family: inherit !important;
    color: var(--ebr-text) !important;
    background-color: #f9fafb !important;
    background-image: none !important;
    border: 1.5px solid var(--ebr-border) !important;
    border-radius: var(--ebr-radius) !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: auto;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ebr-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 34px !important;
}

.ebr-field input::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.ebr-field input:focus,
.ebr-field select:focus {
    border-color: var(--ebr-accent) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
}

.ebr-field input.ebr-invalid,
.ebr-field select.ebr-invalid,
.ebr-image-dropdown.ebr-invalid .ebr-dropdown-toggle {
    border-color: var(--ebr-error) !important;
    animation: ebrShake 0.3s ease;
}

@keyframes ebrShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.ebr-error-msg {
    display: block !important;
    color: var(--ebr-error) !important;
    font-size: 12.5px !important;
    margin: 5px 0 0 0 !important;
    min-height: 14px;
    font-family: inherit !important;
}

/* Phone group */
.ebr-phone-group {
    display: flex !important;
    gap: 8px !important;
    width: 100%;
}

.ebr-country-code {
    flex: 0 0 130px !important;
    width: 130px !important;
    cursor: pointer;
    padding-left: 10px !important;
}

.ebr-phone-group input {
    flex: 1 !important;
    min-width: 0;
}

/* Image dropdown */
.ebr-image-dropdown {
    display: block;
    position: relative;
}

.ebr-dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 11px 15px !important;
    background-color: #f9fafb !important;
    background-image: none !important;
    border: 1.5px solid var(--ebr-border) !important;
    border-radius: var(--ebr-radius) !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 15.5px !important;
    font-family: inherit !important;
    color: var(--ebr-text) !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ebr-dropdown-toggle:hover {
    border-color: #fdba74 !important;
    background-color: #f9fafb !important;
    color: var(--ebr-text) !important;
}

.ebr-image-dropdown.ebr-open .ebr-dropdown-toggle {
    border-color: var(--ebr-accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
}

.ebr-dropdown-selected {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 34px;
}

.ebr-dropdown-selected img {
    width: 34px !important;
    height: 34px !important;
    object-fit: cover !important;
    border-radius: 7px !important;
    display: block !important;
}

.ebr-dropdown-selected span {
    color: var(--ebr-text) !important;
    font-size: 15.5px !important;
}

.ebr-dropdown-placeholder {
    color: #9ca3af !important;
}

.ebr-dropdown-arrow {
    flex-shrink: 0;
    color: var(--ebr-muted) !important;
    transition: transform 0.2s ease;
}

.ebr-image-dropdown.ebr-open .ebr-dropdown-arrow {
    transform: rotate(180deg);
}

.ebr-dropdown-panel {
    display: none;
    list-style: none !important;
    margin: 8px 0 0 0 !important;
    padding: 7px !important;
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid var(--ebr-border) !important;
    border-radius: var(--ebr-radius) !important;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12) !important;
    max-height: 260px;
    overflow-y: auto;
    animation: ebrFadeIn 0.15s ease;
}

.ebr-image-dropdown.ebr-open .ebr-dropdown-panel {
    display: block !important;
}

.ebr-dropdown-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    cursor: pointer;
    background-color: transparent !important;
    transition: background-color 0.15s ease;
}

.ebr-dropdown-option:hover,
.ebr-dropdown-option.ebr-focused {
    background-color: #fff7ed !important;
}

.ebr-dropdown-option.ebr-selected {
    background-color: #ffedd5 !important;
}

.ebr-dropdown-option img {
    width: 54px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 7px !important;
    flex-shrink: 0;
    display: block !important;
}

.ebr-dropdown-option-text {
    font-size: 15px !important;
    color: var(--ebr-text) !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

/* Submit button */
.ebr-submit-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 6px 0 0 0 !important;
    padding: 15px 18px !important;
    background-color: var(--ebr-accent) !important;
    background-image: linear-gradient(135deg, var(--ebr-accent), var(--ebr-accent-dark)) !important;
    color: #ffffff !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border: none !important;
    border-radius: var(--ebr-radius) !important;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ebr-submit-btn:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.4) !important;
}

.ebr-submit-btn:active {
    transform: translateY(0);
}

.ebr-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed;
    transform: none;
}

.ebr-btn-spinner {
    display: inline-block !important;
    width: 17px !important;
    height: 17px !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: ebrSpin 0.7s linear infinite;
}

@keyframes ebrSpin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 560px) {
    .ebr-heading {
        font-size: 22px !important;
    }

    .ebr-phone-group {
        flex-direction: column !important;
    }

    .ebr-country-code {
        flex: 1 !important;
        width: 100% !important;
    }
}

@media (max-width: 400px) {
    .ebr-heading {
        font-size: 20px !important;
    }

    .ebr-field input,
    .ebr-field select,
    .ebr-dropdown-toggle,
    .ebr-submit-btn {
        font-size: 14.5px !important;
    }
}
