/**
 * Event Submission Form — Stylesheet (Minimal Underline Style)
 * Path: /wp-content/themes/YOUR-THEME/assets/css/event-form.css
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
    --esf-bg:        #f5f0e8;
    --esf-card:      #f5f0e8;
    --esf-border:    #c8bfad;
    --esf-accent:    #1a1a1a;
    --esf-accent2:   #444;
    --esf-text:      #1a1a1a;
    --esf-muted:     #888;
    --esf-input-bg:  transparent;
    --esf-radius:    0px;
    --esf-font:      'DM Sans', sans-serif;
    --esf-heading:   'Cormorant Garamond', serif;
}

/* ── Reset ──────────────────────────────────────────────── */
.esf-wrap * {
/*     box-sizing: border-box;
    margin: 0;
    padding: 0; */
}

/* ── Wrapper ────────────────────────────────────────────── */
.esf-wrap {
/*     font-family: var(--esf-font);
    background: var(--esf-bg);
    color: var(--esf-text);
    padding: 60px 20px;
    min-height: 100vh; */
}

.esf-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────── */
.esf-header {
    text-align: left;
    margin-bottom: 52px;
}

.esf-header h2 {
    font-family: var(--esf-heading);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    color: var(--esf-text);
    line-height: 1.1;
    letter-spacing: -0.5px;
    -webkit-text-fill-color: unset;
    background: none;
}

.esf-header p {
    color: var(--esf-muted);
    margin-top: 10px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.2px;
}

/* ── Card ───────────────────────────────────────────────── */
.esf-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 48px;
}

.esf-section-title {
    font-family: var(--esf-font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--esf-muted);
    margin-bottom: 36px;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Grid ───────────────────────────────────────────────── */
.esf-grid {
    display: grid;
    gap: 0;
}

.esf-grid-2 { grid-template-columns: 1fr 1fr; }
.esf-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Field ──────────────────────────────────────────────── */
.esf-field {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 40px 40px 0;
    position: relative;
}

.esf-grid-2 .esf-field:nth-child(even),
.esf-grid-3 .esf-field:nth-child(3n) {
    padding-right: 0;
}

.esf-field label {
    color: #000 !important;
    font-family: "Geologica" !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    margin-bottom: 12px;
}

.esf-field label .req {
    color: var(--esf-text);
    margin-left: 2px;
}

/* ── Inputs ─────────────────────────────────────────────── */
.esf-field input[type="text"],
.esf-field input[type="email"],
.esf-field input[type="date"],
.esf-field input[type="time"],
.esf-field input[type="url"],
.esf-field input[type="number"],
.esf-field input[type="tel"],
.esf-field select,
.esf-field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--esf-border);
    border-radius: 0;
    color: var(--esf-text);
    font-family: var(--esf-font);
    font-size: 14px;
    font-weight: 400;
    padding: 0 0 12px 0;
    outline: none;
    transition: border-color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    letter-spacing: 0.1px;
}

.esf-field input::placeholder,
.esf-field textarea::placeholder {
    color: transparent;
}

.esf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23888' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-color: transparent;
    padding-right: 24px;
    cursor: pointer;
}

.esf-field select option {
    background: #f5f0e8;
    color: #1a1a1a;
}

.esf-field input:focus,
.esf-field select:focus,
.esf-field textarea:focus {
    border-bottom-color: var(--esf-text);
    box-shadow: none;
    outline: none;
}

.esf-field textarea {
    min-height: 80px;
    resize: none;
    line-height: 1.6;
}

/* ── WP Editor (wp_editor / TinyMCE) ───────────────────── */
.esf-wpeditor-wrap {
    border-bottom: 1px solid var(--esf-border);
    transition: border-color 0.25s ease;
}

.esf-wpeditor-wrap:focus-within {
    border-bottom-color: var(--esf-text);
}

/* Tab row (Visual / Text) */
.esf-wpeditor-wrap .wp-editor-tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 8px 0;
    background: transparent;
    border: none;
}

.esf-wpeditor-wrap .wp-switch-editor {
    background: transparent;
    border: 1px solid var(--esf-border);
    color: var(--esf-muted);
    font-family: var(--esf-font);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border-radius: 0;
}

.esf-wpeditor-wrap .wp-switch-editor:hover,
.esf-wpeditor-wrap .wp-switch-editor.switch-tmce {
    background: var(--esf-text);
    color: var(--esf-bg);
    border-color: var(--esf-text);
}

/* Toolbar */
.esf-wpeditor-wrap .mce-top-part,
.esf-wpeditor-wrap .mce-toolbar-grp,
.esf-wpeditor-wrap .mce-panel {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--esf-border) !important;
    box-shadow: none !important;
}

.esf-wpeditor-wrap .mce-btn-group:not(:first-child) {
    border-left: 1px solid var(--esf-border) !important;
}

.esf-wpeditor-wrap .mce-btn button {
    color: var(--esf-muted) !important;
}

.esf-wpeditor-wrap .mce-btn:hover button,
.esf-wpeditor-wrap .mce-btn.mce-active button {
    color: var(--esf-text) !important;
}

/* Editor container — remove default WP border box */
.esf-wpeditor-wrap .wp-editor-container {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

/* TinyMCE iframe body (injected via WP) */
.esf-wpeditor-wrap .mce-edit-area iframe {
    background: transparent !important;
}

/* Quicktags / Text tab textarea */
.esf-wpeditor-wrap .wp-editor-area {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--esf-text) !important;
    font-family: var(--esf-font) !important;
    font-size: 14px !important;
    padding: 12px 0 !important;
    resize: none !important;
    box-shadow: none !important;
    outline: none !important;
    min-height: 140px;
}

/* Quicktags toolbar */
.esf-wpeditor-wrap #qt_esf_description_toolbar {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--esf-border);
    padding: 6px 0;
}

.esf-wpeditor-wrap #qt_esf_description_toolbar .ed_button {
    background: transparent;
    border: 1px solid var(--esf-border);
    color: var(--esf-muted);
    font-size: 11px;
    padding: 3px 8px;
    margin: 0 2px 0 0;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s;
}

.esf-wpeditor-wrap #qt_esf_description_toolbar .ed_button:hover {
    background: var(--esf-text);
    color: var(--esf-bg);
    border-color: var(--esf-text);
}

/* ── Upload Zone ────────────────────────────────────────── */
.esf-upload-zone {
    border: 1px dashed var(--esf-border);
    border-radius: 0;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    background: rgba(255, 255, 255, 0.3);
}

.esf-upload-zone:hover {
    border-color: var(--esf-text);
    background: rgba(255, 255, 255, 0.5);
}

.esf-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.esf-upload-icon {
    font-size: 22px;
    margin-bottom: 8px;
    display: block;
}

.esf-upload-zone p {
    color: var(--esf-muted);
    font-size: 12px;
    font-weight: 300;
}

.esf-upload-zone strong {
    color: var(--esf-text);
    font-size: 13px;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.esf-upload-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0;
    margin-top: 12px;
    display: none;
}

/* ── Validation Errors ──────────────────────────────────── */
.esf-field .error {
    color: #c0392b;
    font-size: 11px;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.1px;
}

.esf-field input.error,
.esf-field select.error,
.esf-field textarea.error {
    border-bottom-color: #c0392b !important;
}

/* ── Time Row ───────────────────────────────────────────── */
.esf-time-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.esf-time-row span {
    color: var(--esf-muted);
    font-size: 12px;
    white-space: nowrap;
    padding-bottom: 12px;
}

/* ── Submit Button ──────────────────────────────────────── */
.esf-submit-wrap {
    text-align: left;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--esf-border);
}

.esf-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--esf-text);
    color: var(--esf-bg);
    border: none;
    border-radius: 0;
    padding: 16px 48px;
    font-family: var(--esf-font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    box-shadow: none;
}

.esf-btn:hover {
    background: #333;
    transform: none;
    box-shadow: none;
    color: #fff;
}

.esf-btn:active {
    background: #000;
}

.esf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.esf-btn .esf-spinner {
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(245, 240, 232, 0.4);
    border-top-color: #f5f0e8;
    border-radius: 50%;
    animation: esf-spin 0.7s linear infinite;
    display: none;
}

.esf-btn.loading .esf-spinner {
    display: block;
}

.esf-btn.loading .esf-btn-label {
    opacity: 0.7;
}

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

/* ── Alert Messages ─────────────────────────────────────── */
.esf-alert {
    padding: 14px 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 32px;
    display: none;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid transparent;
}

.esf-alert.success {
    background: transparent;
    border-bottom-color: #2d6a4f;
    color: #2d6a4f;
}

.esf-alert.error {
    background: transparent;
    border-bottom-color: #c0392b;
    color: #c0392b;
}

/* ── Divider between sections ───────────────────────────── */
.esf-card + .esf-card {
    border-top: 1px solid var(--esf-border);
    padding-top: 48px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .esf-field {
        padding-right: 0;
    }
    .esf-grid-2,
    .esf-grid-3 {
        grid-template-columns: 1fr;
    }
    .esf-header h2 {
        font-size: clamp(30px, 8vw, 48px);
    }
    .esf-submit-wrap {
        text-align: center;
    }
    .esf-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Venue Repeater ─────────────────────────────────────── */
.esf-venue-row {
    position: relative;
}

.esf-venue-row + .esf-venue-row {
    border-top: 1px dashed var(--esf-border);
    margin-top: 32px;
    padding-top: 32px;
}

.esf-repeater-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: var(--esf-muted);
    font-size: 11px;
    font-family: var(--esf-font);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.esf-repeater-remove-btn:hover {
    color: #c0392b;
}

.esf-repeater-add-wrap {
    margin-top: 24px;
}

.esf-repeater-add-btn {
    background: transparent;
    border: 1px solid var(--esf-border);
    color: var(--esf-text);
    font-family: var(--esf-font);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.esf-repeater-add-btn:hover {
    background: var(--esf-text);
    color: var(--esf-bg);
    border-color: var(--esf-text);
}
.esf-section-icon svg {
    width: 20px;
    height: 20px;
}
.esf-upload-icon svg {
    height: 20px;
    width: 20px;
}
.esf-field input, .esf-field  textarea {
    padding: 0px 0px 10px 0px;
}
/* ── Time input wrapper for error placement ─── */
.esf-time-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.esf-time-input-wrap input {
    width: 100%;
}

.esf-time-row .esf-time-separator {
    color: var(--esf-muted);
    font-size: 12px;
    white-space: nowrap;
    padding-bottom: 12px;
    align-self: flex-end;
}
/* ── Image Upload Error State ───────────────────────────── */
.esf-upload-zone.esf-upload-error {
    border-color: #c0392b;
    border-style: dashed;
}

.esf-image-error {
    color: #c0392b;
    font-size: 11px;
    margin-top: 6px;
    font-weight: 400;
    display: block;
}