/* Events Widget — Self-contained styling voor publiek formulier */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--ev-font, Inter, sans-serif);
    background: var(--ev-bg, #ffffff);
    color: var(--ev-text, #1a1a1a);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.ev-widget {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 24px;
}

/* Hero afbeelding */
.ev-hero {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: var(--ev-radius, 12px) var(--ev-radius, 12px) 0 0;
}

.ev-content { padding: 28px 24px; }

.ev-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    color: inherit;
}

/* Meta info */
.ev-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ev-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: inherit;
    opacity: 0.7;
}

.ev-meta-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--ev-accent);
    opacity: 1;
    flex-shrink: 0;
}

.ev-description {
    font-size: 14px;
    color: inherit;
    opacity: 0.7;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Gesloten melding */
.ev-closed {
    padding: 32px 20px;
    text-align: center;
    background: rgba(220,38,38,0.1);
    border-radius: var(--ev-radius, 12px);
    color: #ef4444;
    font-size: 15px;
    font-weight: 500;
}

/* Secties */
.ev-section {
    margin-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(128,128,128,0.2);
}

.ev-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.ev-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: inherit;
}

/* Tickets / Producten */
.ev-tickets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ev-ticket {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 14px 16px;
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 10px;
    background: rgba(128,128,128,0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ev-ticket:hover {
    border-color: var(--ev-accent);
}

.ev-ticket.uitverkocht { opacity: 0.5; pointer-events: none; }

.ev-ticket-info { flex: 1; min-width: 0; }

.ev-ticket-namen { flex-basis: 100%; }

.ev-ticket-naam {
    font-size: 15px;
    font-weight: 600;
    color: inherit;
}

.ev-ticket-desc {
    font-size: 12px;
    color: inherit;
    opacity: 0.6;
    margin-top: 2px;
}

.ev-ticket-prijs {
    font-size: 15px;
    font-weight: 700;
    color: var(--ev-accent);
    margin-top: 4px;
}

.ev-ticket-sold {
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    text-transform: uppercase;
    margin-top: 2px;
}

.ev-ticket-remaining {
    font-size: 11px;
    color: #ca8a04;
    margin-top: 2px;
}

/* Naam per persoon velden */
.ev-ticket-namen {
    padding: 10px 14px;
    background: rgba(128,128,128,0.06);
    border-radius: 8px;
    border: 1px solid rgba(128,128,128,0.12);
}

.ev-namen-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 8px;
}

.ev-naam-rij {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.ev-naam-rij:last-child { margin-bottom: 0; }

.ev-naam-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(128,128,128,0.25);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(128,128,128,0.04);
    color: inherit;
    font-family: inherit;
}

.ev-naam-input:focus {
    outline: none;
    border-color: var(--ev-accent);
    box-shadow: 0 0 0 2px rgba(var(--ev-accent-rgb, 234,179,8), 0.15);
}

/* BTW label */
.ev-btw-label {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.6;
}

/* Stepper */
.ev-ticket-stepper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ev-stepper-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(128,128,128,0.3);
    background: rgba(128,128,128,0.08);
    cursor: pointer;
    color: inherit;
    transition: background 0.1s, border-color 0.1s;
}

.ev-stepper-btn:first-child { border-radius: 8px 0 0 8px; }
.ev-stepper-btn:last-child { border-radius: 0 8px 8px 0; }

.ev-stepper-btn:hover:not(:disabled) {
    background: var(--ev-accent);
    border-color: var(--ev-accent);
    color: var(--ev-btn-text, #fff);
}

.ev-stepper-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.ev-stepper-btn .material-symbols-outlined { font-size: 18px; }

.ev-stepper-input {
    width: 48px;
    height: 36px;
    border: 1px solid rgba(128,128,128,0.3);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: rgba(128,128,128,0.04);
    color: inherit;
    -moz-appearance: textfield;
}

.ev-stepper-input::-webkit-inner-spin-button,
.ev-stepper-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Form fields */
.ev-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ev-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ev-field.full { grid-column: 1 / -1; }

.ev-field label {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    opacity: 0.7;
}

.ev-field input,
.ev-field textarea,
.ev-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    background: rgba(128,128,128,0.08);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ev-field input:focus,
.ev-field textarea:focus,
.ev-field select:focus {
    outline: none;
    border-color: var(--ev-accent);
    box-shadow: 0 0 0 3px rgba(128,128,128,0.1);
}

.ev-field input[readonly] {
    opacity: 0.6;
}

.ev-field input::placeholder,
.ev-field textarea::placeholder {
    color: inherit;
    opacity: 0.4;
}

/* Validatie feedback */
.ev-field-error {
    font-size: 12px;
    color: #ef4444;
    min-height: 0;
    transition: all 0.15s;
}

.ev-field-error:empty { display: none; }

.ev-field input.ev-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239,68,68,0.15);
}

.ev-field input.ev-valid {
    border-color: #22c55e;
}

/* Checkbox */
.ev-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 0;
    color: inherit;
}

.ev-checkbox-label input[type="checkbox"],
.ev-checkbox input {
    accent-color: var(--ev-accent);
}

.ev-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: inherit;
}

/* Bedrijf velden */
.ev-bedrijf-velden { padding: 16px 0 0; }
.ev-btw-row { display: flex; gap: 8px; }
.ev-btw-row input { flex: 1; }

.ev-btn-secondary {
    padding: 10px 16px;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 8px;
    background: rgba(128,128,128,0.08);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ev-accent);
    white-space: nowrap;
    transition: background 0.15s;
}

.ev-btn-secondary:hover {
    background: rgba(128,128,128,0.15);
}

.ev-btw-status {
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
}

/* Betaal opties */
.ev-betaal-opties {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ev-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid rgba(128,128,128,0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    color: inherit;
}

.ev-radio-card:has(input:checked) {
    border-color: var(--ev-accent);
    background: rgba(128,128,128,0.05);
}

.ev-radio-card input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--ev-accent);
}

.ev-radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ev-radio-content strong { font-size: 14px; color: inherit; }
.ev-radio-content span { font-size: 12px; color: inherit; opacity: 0.6; }

/* Overzicht */
.ev-overzicht {
    background: rgba(128,128,128,0.06);
    border-radius: 10px;
    padding: 20px !important;
    border: none !important;
}

.ev-overzicht-regel {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: inherit;
    opacity: 0.8;
}

.ev-totaal {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--ev-accent);
    font-size: 18px;
    font-weight: 700;
    color: inherit;
}

/* Submit */
.ev-submit {
    text-align: center;
    padding-top: 8px;
}

.ev-btn-primary {
    width: 100%;
    padding: 16px 32px;
    background: var(--ev-accent);
    color: var(--ev-btn-text, #ffffff);
    border: none;
    border-radius: var(--ev-radius, 12px);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.ev-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ev-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ev-betaal-info {
    font-size: 12px;
    color: inherit;
    opacity: 0.5;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .ev-content { padding: 20px 16px; }
    .ev-title { font-size: 22px; }
    .ev-form-grid { grid-template-columns: 1fr; }
    .ev-ticket {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .ev-ticket-stepper { align-self: flex-end; }
    .ev-hero { height: 160px; }
}
