/**
 * /assets/css/group-decisions.css
 *
 * Purpose:  Glassmorphism-Styling fuer Gruppen-Entscheidungen/Events
 *           Decision-Cards, Vote-Buttons, Entity-Badges, Ergebnis-Ansicht
 * Deps:     app.css (variables)
 * Load:     index.php
 * Version:  1.0.0
 */

/* ==========================
   Decision Card (Active)
   ========================== */
.dec-card {
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: .75rem;
    padding: 1rem;
    transition: border-color .2s, box-shadow .2s;
}

.dec-card--active {
    border-left: 3px solid rgba(255, 193, 7, .5);
}

.dec-card--active:hover {
    border-color: rgba(255, 193, 7, .6);
    box-shadow: 0 0 20px rgba(255, 193, 7, .08);
}

.dec-card--closed {
    opacity: .7;
    border-left: 3px solid rgba(108, 117, 125, .3);
}

/* Header */
.dec-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .5rem;
}

.dec-card__title-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.dec-card__title {
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dec-card__time {
    font-size: .75rem;
    color: rgba(255, 255, 255, .45);
    white-space: nowrap;
}

.dec-card__desc {
    font-size: .9rem;
    color: rgba(255, 255, 255, .7);
    margin-bottom: .75rem;
    line-height: 1.5;
}

/* ==========================
   Entity Badges (Monster/NPC)
   ========================== */
.dec-card__entities {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}

.dec-entity-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem;
    border-radius: .5rem;
    font-size: .8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .1);
}

.dec-entity-badge--monster {
    border-color: rgba(220, 53, 69, .3);
    color: #ff6b6b;
}

.dec-entity-badge--npc {
    border-color: rgba(176, 140, 255, .3);
    color: #b08cff;
}

/* ==========================
   Entity Picker (Create Form)
   ========================== */
.dec-entity-picker .dec-entity-btn.active {
    background: rgba(93, 214, 201, .15);
    border-color: var(--accent);
    color: var(--accent);
}

.dec-selected-entities {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

/* ==========================
   Options / Voting
   ========================== */
.dec-card__options {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.dec-option {
    background: rgba(255, 255, 255, .03);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, .08);
    border-left: 3px solid var(--opt-color, #6c757d);
    border-radius: .5rem;
    padding: .6rem .75rem;
    transition: border-color .2s, background .2s;
}

.dec-option:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .15);
}

.dec-option__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .4rem;
}

.dec-option__label {
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.dec-option__label i {
    color: var(--opt-color, #6c757d);
}

.dec-option__count {
    background: var(--opt-color, #6c757d);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 1rem;
    min-width: 1.3rem;
    text-align: center;
}

/* ==========================
   Vote Button
   ========================== */
.dec-vote-form {
    display: inline-block;
    margin-top: .3rem;
    margin-right: .3rem;
}

.dec-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .7rem;
    border-radius: .5rem;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: inherit;
    font-size: .8rem;
    cursor: pointer;
    transition: transform .15s, border-color .15s, box-shadow .15s, background .15s;
}

.dec-vote-btn:hover {
    transform: translateY(-2px);
    border-color: var(--opt-color, var(--accent));
    box-shadow: 0 4px 12px rgba(93, 214, 201, .15);
    background: rgba(93, 214, 201, .08);
}

.dec-vote-btn__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================
   Custom Vote Form
   ========================== */
.dec-custom-form {
    margin-top: .4rem;
}

.dec-custom-vote {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .4rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
}

.dec-custom-vote__text {
    font-style: italic;
}

/* ==========================
   Voter Avatars
   ========================== */
.dec-option__voters {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .3rem;
}

.dec-voter-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .15);
    transition: transform .15s;
}

.dec-voter-avatar:hover {
    transform: scale(1.15);
}

/* ==========================
   My Vote Info
   ========================== */
.dec-my-vote {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .5rem;
    padding: .4rem .6rem;
    border-radius: .5rem;
    background: rgba(93, 214, 201, .06);
    border: 1px solid rgba(93, 214, 201, .15);
    font-size: .85rem;
}

/* ==========================
   Actions (GM/Admin)
   ========================== */
.dec-card__actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

/* ==========================
   Results (Closed)
   ========================== */
.dec-card__results {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .5rem;
}

.dec-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .35rem .5rem;
    border-radius: .4rem;
    background: rgba(255, 255, 255, .03);
    border-left: 3px solid var(--opt-color, #6c757d);
}

.dec-result-label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 500;
}

.dec-result-label i {
    color: var(--opt-color, #6c757d);
}

.dec-result-count {
    font-size: .75rem;
    opacity: .6;
}

.dec-result-voters {
    display: flex;
    gap: .2rem;
}

/* ==========================
   Option Editor (Create Form)
   ========================== */
.dec-option-item {
    background: rgba(255, 255, 255, .03);
    padding: .35rem .5rem;
    border-radius: .4rem;
    border: 1px solid rgba(255, 255, 255, .06);
}

/* ==========================
   Responsive
   ========================== */
@media (max-width: 576px) {
    .dec-card {
        padding: .75rem;
    }

    .dec-card__title {
        font-size: 1rem;
    }

    .dec-vote-btn {
        padding: .25rem .5rem;
        font-size: .75rem;
    }

    .dec-vote-btn__avatar {
        width: 20px;
        height: 20px;
    }

    .dec-voter-avatar {
        width: 24px;
        height: 24px;
    }
}

/* ==========================
   Reduced Motion
   ========================== */
@media (prefers-reduced-motion: reduce) {
    .dec-vote-btn,
    .dec-voter-avatar,
    .dec-card,
    .dec-option {
        transition: none;
    }

    .dec-vote-btn:hover {
        transform: none;
    }

    .dec-voter-avatar:hover {
        transform: none;
    }
}
