/**
 * 24 Events Lite — Front-End Submission Form Styles
 * Clean, neutral styles that sit inside any theme without conflict.
 * All selectors are prefixed with .tel- to avoid collisions.
 */

/* ── Form wrapper ──────────────────────────────────────────────────────────── */
.tel-submit-form {
    max-width: 820px;
    font-family: inherit;
    color: inherit;
    line-height: 1.5;
}

/* ── Sections ──────────────────────────────────────────────────────────────── */
.tel-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 24px 28px;
    margin-bottom: 24px;
    background: #fff;
}

.tel-section-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
    color: inherit;
}

.tel-subsection {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.tel-subsection-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 12px;
    color: inherit;
}

/* ── Layout helpers ────────────────────────────────────────────────────────── */
.tel-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.tel-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
}

.tel-field--full    { flex: 1 1 100%; }
.tel-field--half    { flex: 1 1 calc(50% - 8px); min-width: 180px; }
.tel-field--quarter { flex: 1 1 calc(25% - 12px); min-width: 120px; }

/* ── Labels ────────────────────────────────────────────────────────────────── */
.tel-label {
    font-size: 0.875em;
    font-weight: 600;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tel-req {
    color: #c0392b;
}

.tel-hint {
    font-weight: 400;
    color: #777;
    font-size: 0.85em;
}

.tel-hint-text {
    font-size: 0.875em;
    color: #666;
    margin: 0 0 12px;
}

/* ── Inputs ────────────────────────────────────────────────────────────────── */
.tel-input,
.tel-select,
.tel-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s;
    line-height: 1.4;
}

.tel-input:focus,
.tel-select:focus,
.tel-textarea:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74,144,217,0.15);
}

.tel-textarea {
    resize: vertical;
    min-height: 80px;
}

input[type="file"].tel-input {
    padding: 6px;
}

/* ── Checkbox row ──────────────────────────────────────────────────────────── */
.tel-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.tel-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875em;
    cursor: pointer;
    font-weight: 400;
}

/* ── Tables (specific dates / exceptions) ──────────────────────────────────── */
.tel-sd-table,
.tel-ed-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 0.875em;
}

.tel-sd-table th,
.tel-ed-table th {
    text-align: left;
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 2px solid #e0e0e0;
    color: #555;
}

.tel-sd-table td,
.tel-ed-table td {
    padding: 6px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.tel-sd-table .tel-input,
.tel-ed-table .tel-input,
.tel-ed-table .tel-select {
    width: auto;
    min-width: 120px;
}

.tel-ed-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.tel-ed-inputs .tel-select {
    min-width: 100px;
    width: auto;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.tel-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 0.875em;
    font-weight: 600;
    border: 1px solid #4a90d9;
    border-radius: 4px;
    background: #f0f7ff;
    color: #2a6db5;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.tel-btn-add:hover {
    background: #dceeff;
    border-color: #2a6db5;
}

.tel-btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 0.8em;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #999;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}

.tel-btn-remove:hover {
    background: #ffeaea;
    color: #c0392b;
    border-color: #c0392b;
}

.tel-btn-submit {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1em;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    background: #2a6db5;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    letter-spacing: 0.02em;
}

.tel-btn-submit:hover {
    background: #1f5490;
}

.tel-section--submit {
    background: #f8f9fa;
    text-align: center;
}

/* ── Messages ──────────────────────────────────────────────────────────────── */
.tel-success-message {
    padding: 18px 22px;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    border-radius: 5px;
    color: #1e8449;
    margin-bottom: 20px;
}

.tel-error-messages {
    padding: 14px 18px;
    background: #fdf3f2;
    border: 1px solid #f5c6c2;
    border-radius: 5px;
    color: #c0392b;
    margin-bottom: 20px;
}

.tel-error-messages p {
    margin: 4px 0;
    font-size: 0.9em;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tel-section {
        padding: 16px;
    }

    .tel-field--half,
    .tel-field--quarter {
        flex: 1 1 100%;
    }

    .tel-sd-table,
    .tel-ed-table {
        font-size: 0.8em;
    }

    .tel-btn-submit {
        width: 100%;
    }
}
