/* ============================================================
   CLANS — Übersicht, Details, Mitglieder, Teams
   ============================================================ */

/* ---- aus details.php ---- */
/* ---------------------------------------------------------------
   GRÜNDER-KARTE
--------------------------------------------------------------- */
.founder-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 6px;
}
.founder-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(108,123,255,0.2);
    background: rgba(108,123,255,0.06);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.founder-card:hover {
    background: rgba(108,123,255,0.14);
    border-color: rgba(108,123,255,0.4);
}
/* Edit-Mode: goldener Rahmen als Hinweis */
.founder-card--editable {
    border-color: rgba(184,134,11,0.55) !important;
    background: rgba(184,134,11,0.08) !important;
    cursor: pointer;
}
.founder-card--editable:hover {
    border-color: rgba(184,134,11,0.85) !important;
    background: rgba(184,134,11,0.16) !important;
}
.founder-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}
.founder-name {
    font-size: 13px;
    color: #ddd;
}
.founder-card:hover .founder-name { color: #fff; }
.founder-transfer-hint {
    font-size: 13px;
    margin-left: 2px;
    opacity: 0.7;
}

/* ---------------------------------------------------------------
   EDIT-MODE BUTTON
--------------------------------------------------------------- */
.edit-mode-btn {
    width: 28px; height: 28px; border-radius: 4px;
    background: rgba(80,80,100,0.6); color: #fff;
    border: none; cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.edit-mode-btn.active {
    background: #6c7bff;
    box-shadow: 0 0 10px rgba(108,123,255,0.5);
}

/* ---------------------------------------------------------------
   AVATAR / LOGO DROP-ZONE
--------------------------------------------------------------- */
.avatar-drop-zone {
    position: relative; display: inline-block; border-radius: 6px;
}
.avatar-drop-zone.active { cursor: pointer; }
.avatar-drop-zone.drag-over .avatar_large { opacity: 0.5; }
.avatar-drop-zone.drag-over::after {
    content: '📂 Loslassen';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff;
    background: rgba(108,123,255,0.5); border-radius: 6px;
    pointer-events: none;
}
.avatar-overlay {
    position: absolute; inset: 0; border-radius: 6px;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.avatar-drop-zone.active:hover .avatar-overlay,
.avatar-drop-zone.active:focus-within .avatar-overlay { opacity: 1; }

/* ---------------------------------------------------------------
   CROP MODAL
--------------------------------------------------------------- */
.crop-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box;
}
.crop-modal-box {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; width: 100%; max-width: 520px;
    display: flex; flex-direction: column; overflow: hidden;
}
.crop-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 14px; color: #ddd;
}
.crop-close-btn {
    background: none; border: none; color: #aaa;
    font-size: 18px; cursor: pointer; line-height: 1;
}
.crop-close-btn:hover { color: #fff; }
.crop-stage {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    background: #111; overflow: hidden; cursor: grab; user-select: none;
}
.crop-stage:active { cursor: grabbing; }
#clanImgCanvas,
#clanOverlayCanvas {
    position: absolute; inset: 0;
    width: 100% !important; height: 100% !important;
    display: block;
}
#clanOverlayCanvas { pointer-events: none; }
.crop-modal-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; flex-direction: column; gap: 12px;
}
.zoom-row { display: flex; align-items: center; gap: 10px; }
.zoom-label {
    font-size: 12px; color: #888; min-width: 36px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.zoom-row input[type=range] { flex: 1; accent-color: #6c7bff; }
#clanZoomVal { font-size: 12px; color: #aaa; min-width: 36px; text-align: right; }
.crop-foot-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   EDIT-SEKTIONEN
--------------------------------------------------------------- */
.edit-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.06em; color: #a0aaff;
    margin-top: 20px; padding: 7px 12px;
    background: rgba(108,123,255,0.12);
    border: 1px solid rgba(108,123,255,0.25);
    border-bottom: none; border-radius: 6px 6px 0 0;
}
.edit-section-title:first-of-type { margin-top: 0; }
.edit-block {
    padding: 14px 12px;
    border: 1px solid rgba(108,123,255,0.25);
    border-top: none; border-radius: 0 0 6px 6px;
    background: rgba(0,0,0,0.22); margin-bottom: 2px;
}
.edit-actions { display: flex; align-items: center; gap: 12px; }

/* ---------------------------------------------------------------
   QUILL EDITOR
--------------------------------------------------------------- */
.clan-quill-editor {
    min-height: 180px; background: rgba(0,0,0,0.25);
    border-radius: 0 0 6px 6px; color: #ddd;
}
.ql-toolbar.ql-snow {
    border: 1px solid rgba(108,123,255,0.3) !important;
    border-radius: 6px 6px 0 0; background: rgba(0,0,0,0.3);
}
.ql-toolbar.ql-snow .ql-stroke { stroke: #aaa; }
.ql-toolbar.ql-snow .ql-fill   { fill:   #aaa; }
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke { stroke: #fff; }
.ql-container.ql-snow {
    border: 1px solid rgba(108,123,255,0.3) !important;
    border-top: none !important; border-radius: 0 0 6px 6px;
}
.ql-editor { min-height: 180px; color: #ddd; }
.ql-editor.ql-blank::before { color: #666; }

/* ---------------------------------------------------------------
   ANSICHTS-SEKTIONEN
--------------------------------------------------------------- */
.view-section-title {
    display: flex; align-items: center;
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.06em; color: #a0aaff;
    margin-top: 20px; padding: 7px 12px;
    background: rgba(108,123,255,0.08);
    border: 1px solid rgba(108,123,255,0.2);
    border-bottom: none; border-radius: 6px 6px 0 0;
}
.view-section-title:first-of-type { margin-top: 0; }
.view-block {
    padding: 14px 12px;
    border: 1px solid rgba(108,123,255,0.2);
    border-top: none; border-radius: 0 0 6px 6px;
    background: rgba(0,0,0,0.18); margin-bottom: 2px;
}

/* ---------------------------------------------------------------
   BESCHREIBUNGS-ANSICHT
--------------------------------------------------------------- */
.clan-desc-view {
    font-size: 13px; color: #ccc; line-height: 1.6; padding: 4px 0;
}
.clan-desc-view h1,.clan-desc-view h2,.clan-desc-view h3 {
    color: #ddd; margin: 12px 0 6px;
}
.clan-desc-view ul,.clan-desc-view ol { padding-left: 20px; }
.clan-desc-view a { color: #6c7bff; }

/* ---------------------------------------------------------------
   BUTTONS & FEEDBACK
--------------------------------------------------------------- */
.btn-save {
    padding: 7px 16px; border-radius: 6px; border: none;
    background: #6c7bff; color: #fff; font-size: 13px;
    cursor: pointer; transition: background 0.15s;
}
.btn-save:hover { background: #7f8fff; }
.btn-cancel {
    padding: 7px 16px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent; color: #ccc; font-size: 13px; cursor: pointer;
}
.btn-cancel:hover { background: rgba(255,255,255,0.07); }
.save-feedback { font-size: 13px; }
.feedback-ok   { color: #4caf50; }
.feedback-err  { color: #f44336; }

/* ---- aus details_member.php ---- */
.user_card_slim {
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    align-self: start;
}
.user-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(200, 0, 0, 0.9);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 2;
}
body.editMode .user-delete-btn {
    display: flex;
}
.user_card_slim:hover .user-delete-btn {
    opacity: 1;
    transform: scale(1.1);
}
.user-delete-btn:hover {
    background: rgb(200, 0, 0);
    transform: scale(1.2);
}
.admin-box {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(80, 80, 100, 0.6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.icon-btn:hover {
    background: rgba(100, 100, 130, 0.85);
    transform: scale(1.08);
}

/* ---- aus details_teams.php ---- */
.user_card_slim {
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(200, 0, 0, 0.9);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 2;
}

body.editMode .user-delete-btn {
    display: flex;
}

.user_card_slim:hover .user-delete-btn {
    opacity: 1;
    transform: scale(1.1);
}

.user-delete-btn:hover {
    background: rgb(200, 0, 0);
    transform: scale(1.2);
}

.team-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}

.team-actions {
    display: flex;
    gap: 6px;
}

.team-actions button {
    width: 32px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: rgba(80, 80, 100, 0.6);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.team-actions button:hover {
    background: rgba(100, 100, 130, 0.85);
}

.team-block {
    transition: transform 0.2s ease;
}

.team-dropzone {
    min-height: 60px;
    transition: outline 0.1s;
}

.team-dropzone.drag-over {
    outline: 2px dashed #6c7bff;
    background: rgba(108, 123, 255, 0.05);
}

.draggable-user.dragging {
    opacity: 0.4;
}

body.editMode .draggable-user {
    cursor: grab;
}

body.editMode .draggable-user:active {
    cursor: grabbing;
}

.admin-box {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(80, 80, 100, 0.6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.icon-btn:hover {
    background: rgba(100, 100, 130, 0.85);
    transform: scale(1.08);
}

/* ---------------------------------------------------------------
   CASHPOINT-ZUGRIFF
--------------------------------------------------------------- */
.cashpoint-access-box {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(184,134,11,0.3);
    background: rgba(184,134,11,0.07);
}
.cashpoint-access-title {
    font-size: 12px;
    color: #d8b15a;
    margin-bottom: 8px;
    font-weight: 600;
}
.cashpoint-access-row {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: #ddd;
}
.cashpoint-access-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.team-cashpoint-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(184,134,11,0.08);
}
.team-cashpoint-icon {
    font-size: 13px;
    line-height: 1;
}

/* iOS-Style Toggle */
.cp-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    cursor: pointer;
}
.cp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cp-switch-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.18);
    border-radius: 18px;
    transition: background 0.2s;
}
.cp-switch-slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.cp-switch input:checked + .cp-switch-slider {
    background: #b8860b;
}
.cp-switch input:checked + .cp-switch-slider::before {
    transform: translateX(16px);
}
.cp-switch input:focus-visible + .cp-switch-slider {
    outline: 2px solid #d8b15a;
    outline-offset: 2px;
}
/* ============================================================
   ERGÄNZUNGEN — echte Lücken, waren nirgends definiert
   ============================================================ */

/* Wrapper um die Team-Blöcke (Drag&Drop-Ziel) */
.team-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Platzhalter "noch keine Teams" */
.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-body);
    background: var(--bg-gray-transparent);
    border: 1px solid var(--border-card);
    border-radius: 8px;
}

/* Gründer-Box in den Clan-Infos */
.founder-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-gray-transparent);
    border: 1px solid var(--border-card);
    border-radius: 6px;
}

/* Kleine Statuszeile unter dem Namen (z.B. Team-Rolle) in der Mitgliederliste */
.user_status_slim {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
