﻿/* ============================================================
   Event Workspace  Create Event UI
   Feature-scoped styles (safe, non-global)
   ============================================================ */

.event-workspace-root {
    width: 100%;
    height: 100%;
}

/* ------------------------------------------------------------
   Create Event container
   ------------------------------------------------------------ */

.event-create-root {
    max-width: 820px;
    padding: 2rem 2.5rem;
}

.event-create-header {
    margin-bottom: 1.5rem;
}

.event-create-subtitle {
    margin: 0.35rem 0 0;
    color: #6b7280;
}

.event-create-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

    .event-create-section h3 {
        margin: 0 0 1rem;
        font-size: 1.05rem;
    }

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

    .form-field label {
        font-weight: 600;
        font-size: 0.95rem;
    }

    .form-field input[type="text"],
    .form-field input[type="date"],
    .form-field textarea {
        border: 1px solid #d1d5db;
        border-radius: 0.5rem;
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
        outline: none;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-field.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.validation-message.error {
    color: #b91c1c;
    font-size: 0.9rem;
}

.form-error {
    margin: 0.75rem 0 0.5rem;
    color: #b91c1c;
    font-weight: 600;
}

.event-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

    .event-create-actions button {
        border-radius: 0.6rem;
        font-weight: 600;
    }

        .event-create-actions button.primary {
            background: #2563eb;
            color: #fff;
            border: none;
            padding: 0.6rem 1.25rem;
            cursor: pointer;
        }

            .event-create-actions button.primary:disabled {
                opacity: 0.6;
                cursor: not-allowed;
            }

        .event-create-actions button.secondary {
            background: transparent;
            border: 1px solid #ccc;
            padding: 0.6rem 1.25rem;
        }


/* ============================================================
   Event tabs (Option A) — "real tabs" look
   Uses existing markup:
   - <nav class="event-tabs-nav">
   - <button class="event-tab-button active"> for the selected tab
   ============================================================ */

.event-tabs-root {
    /* keeps the control visually grouped with the content */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0; /* important if the tab content scrolls */
}

.event-tabs-nav {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
    padding: 0 0.25rem;
    /* tab strip baseline */
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
}

.event-tab-button {
    appearance: none;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    color: #6b7280;
    padding: 0.55rem 0.85rem;
    border-top-left-radius: 0.65rem;
    border-top-right-radius: 0.65rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    /* prevents layout jump when borders appear on active */
    margin-bottom: -1px;
}

    .event-tab-button:hover {
        color: #111827;
        background: rgba(17, 24, 39, 0.04);
    }

    .event-tab-button:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    /* Selected tab: looks "connected" to the content */
    .event-tab-button.active {
        color: #111827;
        background: #ffffff;
        border-color: #e5e7eb;
        border-bottom: 1px solid #ffffff; /* visually merges with content surface */
    }

/* Optional: content surface framing (safe even if content styles later change) */
.event-tabs-content {
    border: 1px solid #e5e7eb;
    border-top: none; /* merges with active tab */
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    background: #ffffff;
    padding: 1rem;
    min-height: 0; /* allows inner scrolling layouts */
}

/* ============================================================
   Moderation tab
   (moved from inline <style> in Components/EventTabs/Moderation.razor)
   ============================================================ */

.mod-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    background: rgba(18,18,22,0.92);
    backdrop-filter: blur(8px);
}

.mod-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mod-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mod-filter {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
}

    .mod-filter.active {
        background: rgba(59,130,246,0.20);
        border-color: rgba(59,130,246,0.50);
        color: #ffffff;
    }

.mod-selected {
    color: rgba(255,255,255,0.70);
    font-size: 0.9rem;
    margin-left: 6px;
    margin-right: 6px;
}

.mod-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mod-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.mod-btn {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 92px;
}

    .mod-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    .mod-btn.approve {
        border-color: rgba(34,197,94,0.35);
    }

    .mod-btn.reject {
        border-color: rgba(239,68,68,0.35);
    }

    .mod-btn.unapprove,
    .mod-btn.unreject {
        border-color: rgba(255,255,255,0.18);
    }

.mod-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    color: rgba(255,255,255,0.70);
    font-size: 0.9rem;
}

.mod-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.mod-tile {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.mod-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0b1220;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* REPLACE your current .mod-preview rule with this (treat it as the clickable preview container) */
.mod-preview {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

    /* ADD: apply sizing + fit to the actual media inside the preview */
    .mod-preview img,
    .mod-preview video {
        width: 100%;
        height: 100%;
        object-fit: contain; /* preserve aspect ratio */
        display: block;
    }

.mod-check {
    position: absolute;
    top: 1px;
    right: 1px;
    left: auto;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.90);
    font-weight: 700;
}

    .mod-check.selected {
        background: rgba(59,130,246,0.35);
        border-color: rgba(59,130,246,0.65);
        color: #ffffff;
    }

.mod-name {
    padding: 10px 12px 12px 12px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px 12px 12px;
}

.mod-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
}

    .mod-badge.pending {
        border-color: rgba(59,130,246,0.40);
        background: rgba(59,130,246,0.18);
    }

    .mod-badge.approved {
        border-color: rgba(34,197,94,0.40);
        background: rgba(34,197,94,0.16);
    }

    .mod-badge.rejected {
        border-color: rgba(239,68,68,0.40);
        background: rgba(239,68,68,0.16);
    }

.mod-quick {
    position: absolute;
    top: 1px;
    left: 1px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.mod-quick-btn {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

    .mod-quick-btn.approve {
        border-color: rgba(34,197,94,0.35);
    }

    .mod-quick-btn.reject {
        border-color: rgba(239,68,68,0.35);
    }

.mod-blank {
    border: 1px dashed rgba(0,0,0,0.20);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    background: rgba(255,255,255,0.65);
}

.mod-blank-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.mod-blank-sub {
    color: rgba(0,0,0,0.60);
}

.empty-hint {
    color: rgba(0,0,0,0.55);
    font-size: 0.95rem;
}

/* Preview modal */
.mod-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.mod-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.70);
}

.mod-preview-body {
    position: relative;
    width: min(1100px, calc(100vw - 32px));
    height: min(800px, calc(100vh - 32px));
    margin: 16px auto;
    background: #0b1220;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mod-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.mod-preview-title {
    color: rgba(255,255,255,0.90);
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mod-preview-close {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
}

/* Preview modal */
.mod-preview-media {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* If the Razor renders <img class="mod-preview-media"> / <video class="mod-preview-media"> */
img.mod-preview-media,
video.mod-preview-media {
    max-width: 95vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain; /* preserve aspect ratio */
    border-radius: 10px;
    background: rgba(0,0,0,0.35);
    display: block;
}

/* If the Razor renders a container div: <div class="mod-preview-media"><img .../></div> */
.mod-preview-media img,
.mod-preview-media video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* preserve aspect ratio */
    border-radius: 10px;
    display: block;
}

/* Confirm modal */
.mod-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .mod-confirm-modal .mod-preview-backdrop {
        z-index: 0;
    }

    .mod-confirm-modal > .mod-preview-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.70);
    }

    .mod-confirm-modal .mod-preview-body {
        z-index: 1;
        width: min(520px, calc(100vw - 32px));
        height: auto;
        background: #0b1220;
    }

.mod-confirm-title {
    color: rgba(255,255,255,0.92);
    font-weight: 700;
    margin: 0 0 6px 0;
}

.mod-confirm-text {
    color: rgba(255,255,255,0.70);
    margin: 0;
}

.mod-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 14px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

    .mod-confirm-actions .mod-btn {
        min-width: 96px;
    }