/* ======================================
   Mod-Werkstatt – Styles
   Baut auf css/style.css auf (Variablen, Hintergrund, Schriften).
   ====================================== */

.mods-main {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    padding-top: var(--space-l);
}

.mods-section {
    padding: var(--space-l) 0 var(--space-xl);
}

.mods-container {
    max-width: 760px;
}

/* ---------- Login ---------- */
.mods-login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-s);
}

.mods-login-card {
    background: #FFFFFF;
    padding: var(--space-l);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.mods-login-card h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

.mods-login-card p {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: var(--space-m);
}

.mods-login-card input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: var(--space-s);
    transition: border-color 0.15s ease;
}

.mods-login-card input:focus {
    outline: none;
    border-color: var(--grass-green);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

.mods-login-card .btn-primary {
    width: 100%;
}

.mods-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--redstone-red);
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: var(--space-s);
}

/* ---------- Header ---------- */
.mods-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-s);
    margin-bottom: var(--space-l);
}

.mods-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.mods-camp-label {
    color: var(--text-medium);
    font-size: 1rem;
    margin-top: 2px;
}

.mods-logout {
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-medium);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mods-logout:hover {
    color: var(--text-dark);
    background: #FFFFFF;
    text-decoration: none;
}

/* ---------- Add-Bar ---------- */
.mod-add-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1.25rem;
    margin-bottom: var(--space-m);
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed var(--stone-gray);
    border-radius: 12px;
    color: var(--text-medium);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mod-add-plus {
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 600;
}

.mod-add-bar:hover {
    background: #E6EBEF;
    border-color: var(--grass-green);
    color: var(--grass-green-dark);
}

.mod-add-bar:active {
    transform: scale(0.99);
}

/* ---------- Mod-Liste ---------- */
.mod-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mod-empty {
    text-align: center;
    color: var(--text-medium);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: var(--space-l) var(--space-m);
}

.mod-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    background: #FFFFFF;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.mod-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mod-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-meta {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.mod-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.mod-download,
.mod-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mod-download svg,
.mod-trash svg {
    width: 20px;
    height: 20px;
}

/* Download – wird beim Hovern blau */
.mod-download {
    background: #EEF2F5;
    color: var(--text-medium);
}

.mod-download:hover {
    background: var(--sky-blue-deep);
    color: #FFFFFF;
    text-decoration: none;
}

/* Papierkorb – wird beim Hovern rot */
.mod-trash {
    background: transparent;
    color: var(--stone-gray);
}

.mod-trash:hover {
    background: #FDEBED;
    color: var(--redstone-red);
}

/* ---------- Overlay / Modal ---------- */
.mods-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(44, 62, 80, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-s);
    pointer-events: auto;
}

.mods-overlay[hidden] {
    display: none;
}

.mods-modal {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    padding: var(--space-l);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.mods-modal h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: var(--space-m);
}

.mods-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--stone-gray);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mods-modal-close:hover {
    color: var(--text-dark);
}

.mods-field {
    margin-bottom: var(--space-s);
}

.mods-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
}

.mods-field input[type="text"] {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.15s ease;
}

.mods-field input[type="text"]:focus {
    outline: none;
    border-color: var(--grass-green);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

.mods-field input[type="file"] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-medium);
}

.mods-field input[type="file"]::file-selector-button {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-dark);
    background: #EEF2F5;
    border: none;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mods-field input[type="file"]::file-selector-button:hover {
    background: #DCE3E9;
}

.mods-submit {
    width: 100%;
    margin-top: var(--space-xs);
}

.mods-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mods-form-error {
    color: var(--redstone-red);
    font-size: 0.9rem;
    margin-bottom: var(--space-s);
}

.mods-form-error[hidden] {
    display: none;
}

/* ---------- Loesch-Bestaetigung ---------- */
.mods-modal-confirm {
    text-align: center;
    max-width: 380px;
}

.mods-modal-confirm p {
    color: var(--text-medium);
    margin-bottom: var(--space-m);
}

.mods-confirm-actions {
    display: flex;
    gap: 0.75rem;
}

.mods-btn-cancel,
.mods-btn-delete {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mods-btn-cancel {
    background: #EEF2F5;
    color: var(--text-dark);
}

.mods-btn-cancel:hover {
    background: #DCE3E9;
}

.mods-btn-delete {
    background: var(--redstone-red);
    color: #FFFFFF;
}

.mods-btn-delete:hover {
    background: #b52a37;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .mods-header h1 {
        font-size: 1.6rem;
    }

    .mod-bar {
        padding: 0.875rem 1rem;
    }

    .mod-name {
        font-size: 1rem;
    }
}
