/* ============================================
   NAMENKIEZER - Stylesheet
   ============================================ */

.namenkiezer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

/* ---------- Empty State ---------- */
.namenkiezer-empty {
    text-align: center;
    padding: 40px 20px;
}

.namenkiezer-empty .empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

.namenkiezer-empty p {
    color: var(--text-medium);
    font-size: 16px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ---------- Name Display ---------- */
.name-display {
    width: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F0F0FF 0%, #FFF0F5 100%);
    border-radius: var(--radius-lg);
    border: 3px solid #E8E8F0;
    position: relative;
    overflow: hidden;
}

.name-display-text {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    padding: 20px;
    transition: opacity 0.15s ease;
}

.name-display-text.placeholder-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-light);
}

/* Spinning state */
.name-display.spinning {
    border-color: var(--primary-light);
}

.name-display.spinning .name-display-text {
    color: var(--text-medium);
    font-size: 36px;
}

/* Chosen state - pop effect */
@keyframes namePop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bgFlash {
    0% {
        background: linear-gradient(135deg, #F0F0FF 0%, #FFF0F5 100%);
    }
    30% {
        background: linear-gradient(135deg, #E8E4FF 0%, #FFE8F0 100%);
    }
    100% {
        background: linear-gradient(135deg, #F0F0FF 0%, #FFF0F5 100%);
    }
}

.name-display.chosen {
    animation: bgFlash 0.6s ease;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.15);
}

.name-display.chosen .name-display-text {
    animation: namePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    color: var(--primary);
    font-size: 48px;
}

/* ---------- Pick Button ---------- */
/* Base styles inherited from .tool-action-btn in style.css */

/* ---------- Status bar ---------- */
.name-status {
    font-size: 14px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 12px;
}

.name-status .status-count {
    font-weight: 600;
}

.btn-reset {
    padding: 6px 14px;
    background: var(--bg-light);
    color: var(--primary);
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-reset:hover {
    border-color: var(--primary);
    background: #EEF0FF;
}

/* ---------- Picked Names List ---------- */
.picked-names {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.picked-name-tag {
    padding: 6px 14px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 500;
    animation: tagFadeIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes tagFadeIn {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.picked-name-tag.latest {
    background: #EEF0FF;
    color: var(--primary);
    font-weight: 700;
    border: 1px solid rgba(108, 99, 255, 0.2);
}

/* ---------- All Done State ---------- */
.all-done {
    text-align: center;
    padding: 12px;
    color: var(--accent-green);
    font-weight: 600;
    font-size: 15px;
}

/* ---------- Settings: checkbox rows ---------- */
/* Override the global .form-group label/input rules (block label + 100%-wide
   input) so the checkbox sits inline on the right of its label instead of
   stretched above the text. */
.modal-body .checkbox-label {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
}

.modal-body .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ---------- Settings: order editor ---------- */
.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.4;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 2px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-light);
    border: 1px solid #E8E8F0;
    border-radius: var(--radius-sm);
}

.order-pos {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EEF0FF;
    color: var(--primary);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.order-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-actions {
    flex-shrink: 0;
    display: flex;
    gap: 4px;
}

.order-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-sm);
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.order-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: #EEF0FF;
}

.order-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.order-empty {
    font-size: 14px;
    color: var(--text-medium);
    text-align: center;
    padding: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .name-display {
        min-height: 100px;
    }

    .name-display-text {
        font-size: 32px;
        padding: 16px;
    }

    .name-display.chosen .name-display-text {
        font-size: 32px;
    }

    .name-display.spinning .name-display-text {
        font-size: 26px;
    }

    .name-display-text.placeholder-text {
        font-size: 18px;
    }

    .namenkiezer-container {
        gap: 20px;
    }
}
