/* ==============================================
   ADD EVENT FORM
   ============================================== */

.mec-add-event-wrap {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 820px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e9e9e9;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

.mec-add-event-wrap *, .mec-add-event-wrap *::before, .mec-add-event-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ==============================================
   HEADER
   ============================================== */
.mec-form-header {
    padding: 40px 40px 30px;
    border-bottom: 1px solid #e9e9e9;
    text-align: center;
}

.mec-form-header-icon {
    width: 56px;
    height: 56px;
    background: #021f59;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.mec-form-header-icon i {
    font-size: 24px;
    color: #fff;
}

.mec-form-title {
    font-size: 26px;
    font-weight: 700;
    color: #000;
    margin-bottom: 6px;
}

.mec-form-subtitle {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

/* ==============================================
   STEPS INDICATOR
   ============================================== */
.mec-form-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 40px 10px;
    gap: 0;
}

.mec-form-step {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mec-step-num {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9e9e9;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    transition: all 0.25s;
    background: #fff;
}

.mec-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    transition: color 0.25s;
}

.mec-form-step.active .mec-step-num {
    background: #021f59;
    border-color: #021f59;
    color: #fff;
}

.mec-form-step.active .mec-step-label {
    color: #000;
}

.mec-form-step.completed .mec-step-num {
    background: #06d6a0;
    border-color: #06d6a0;
    color: #fff;
}

.mec-form-step.completed .mec-step-label {
    color: #626262;
}

.mec-form-step-line {
    width: 40px;
    height: 2px;
    background: #e9e9e9;
    margin: 0 12px;
    transition: background 0.3s;
}

.mec-form-step-line.completed {
    background: #06d6a0;
}

/* ==============================================
   PANELS
   ============================================== */
.mec-form-panel {
    display: none;
    padding: 0 40px 20px;
    animation: mecFormFade 0.3s ease;
}

.mec-form-panel.active {
    display: block;
}

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

/* ==============================================
   SECTIONS
   ============================================== */
.mec-form-section {
    padding: 25px 0 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mec-form-section:last-child {
    border-bottom: none;
}

.mec-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mec-section-title i {
    color: #021f59;
    font-size: 15px;
    width: 20px;
    text-align: center;
}

/* ==============================================
   FIELDS
   ============================================== */
.mec-field {
    margin-bottom: 20px;
}

.mec-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.mec-required {
    color: #021f59;
    font-weight: 700;
}

.mec-field input[type="text"],
.mec-field input[type="url"],
.mec-field input[type="datetime-local"],
.mec-field textarea,
.mec-field select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #e9e9e9;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 0;
    -webkit-appearance: none;
}

.mec-field input:focus,
.mec-field textarea:focus,
.mec-field select:focus {
    border-color: #021f59;
    box-shadow: 0 0 0 3px rgba(2, 31, 89, 0.08);
}

.mec-field input::placeholder,
.mec-field textarea::placeholder {
    color: #bbb;
}

.mec-field textarea {
    resize: vertical;
    min-height: 100px;
}

.mec-field-hint {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

/* Multi-day date picker */
.mec-date-add-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.mec-date-input,
.mec-date-add-row input[type="date"] {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #e9e9e9;
    background: #fff;
    color: #333;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
    min-height: 42px;
    transition: border-color 0.2s;
}

.mec-date-input:focus,
.mec-date-add-row input[type="date"]:focus {
    border-color: #021f59;
    box-shadow: 0 0 0 3px rgba(2, 31, 89, 0.08);
}

.mec-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.mec-date-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 10px;
}

.mec-date-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    animation: mecFormFade 0.2s ease;
}

.mec-date-tag i {
    color: #118ab2;
    font-size: 12px;
}

.mec-date-tag-remove {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.mec-date-tag-remove:hover {
    color: #021f59;
}

.mec-field-error {
    display: none;
    font-size: 12px;
    color: #021f59;
    margin-top: 4px;
    font-weight: 600;
}

.mec-field-error.show {
    display: block;
}

.mec-field.has-error input,
.mec-field.has-error textarea {
    border-color: #021f59;
    box-shadow: 0 0 0 3px rgba(2, 31, 89, 0.08);
}

/* Field rows */
.mec-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mec-field-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Select wrapper */
.mec-select-wrap {
    position: relative;
}

.mec-select-wrap::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    color: #999;
}

.mec-select-wrap select {
    padding-right: 36px;
    cursor: pointer;
}

/* ==============================================
   IMAGE UPLOAD
   ============================================== */
.mec-image-dropzone {
    border: 2px dashed #e0e0e0;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mec-image-dropzone:hover {
    border-color: #021f59;
    background: #fdf5f5;
}

.mec-image-dropzone.dragover {
    border-color: #021f59;
    background: #fef0f0;
}

.mec-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mec-dropzone-content i {
    font-size: 30px;
    color: #ccc;
    margin-bottom: 4px;
}

.mec-dropzone-content span {
    font-size: 13px;
    color: #999;
}

.mec-dropzone-content strong {
    color: #021f59;
}

.mec-dropzone-hint {
    font-size: 11px !important;
    color: #bbb !important;
}

/* Image Preview */
.mec-image-preview {
    position: relative;
    width: 100%;
}

.mec-image-preview img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.mec-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: #021f59;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.mec-image-remove:hover {
    background: #011641;
}

/* ==============================================
   NAV BUTTONS
   ============================================== */
.mec-form-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 40px 35px;
}

.mec-form-nav-spacer {
    flex: 1;
}

.mec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
    text-decoration: none;
}

.mec-btn-primary {
    background: #021f59;
    color: #fff;
}

.mec-btn-primary:hover {
    background: #011641;
    color: #fff;
}

.mec-btn-outline {
    background: #fff;
    color: #626262;
    border: 1px solid #e9e9e9;
}

.mec-btn-outline:hover {
    border-color: #021f59;
    color: #021f59;
}

.mec-btn-submit {
    background: #06d6a0;
    color: #fff;
    padding: 12px 32px;
    font-size: 15px;
}

.mec-btn-submit:hover {
    background: #05b888;
}

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

/* ==============================================
   LOADING
   ============================================== */
.mec-form-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 100;
    font-size: 15px;
    font-weight: 600;
    color: #626262;
}

.mec-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e9e9e9;
    border-top-color: #021f59;
    border-radius: 50%;
    animation: mecSpin 0.7s linear infinite;
}

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

/* ==============================================
   ERROR BANNER
   ============================================== */
.mec-form-error-banner {
    margin: 0 40px 20px;
    padding: 14px 20px;
    background: #fef5f5;
    border-left: 4px solid #021f59;
    font-size: 13px;
    font-weight: 500;
    color: #021f59;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==============================================
   SUCCESS
   ============================================== */
.mec-form-success {
    padding: 60px 40px;
    text-align: center;
    animation: mecFormFade 0.4s ease;
}

.mec-form-success-icon {
    font-size: 52px;
    color: #06d6a0;
    margin-bottom: 16px;
}

.mec-form-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.mec-form-success p {
    font-size: 14px;
    color: #626262;
    margin-bottom: 28px;
}

.mec-form-success-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 700px) {
    .mec-add-event-wrap { margin: 20px 12px; }
    .mec-form-header { padding: 30px 20px 24px; }
    .mec-form-title { font-size: 22px; }
    .mec-form-panel { padding: 0 20px 16px; }
    .mec-form-nav { padding: 16px 20px 28px; }
    .mec-form-error-banner { margin: 0 20px 16px; }
    .mec-form-success { padding: 40px 20px; }

    .mec-form-steps { gap: 0; padding: 20px 16px 8px; }
    .mec-step-label { display: none; }
    .mec-form-step-line { width: 24px; margin: 0 6px; }

    .mec-field-row,
    .mec-field-row-3 { grid-template-columns: 1fr; gap: 0; }

    .mec-btn { padding: 10px 20px; font-size: 13px; }
}
