/* src/public/css/lottery-maker.css */

.calc-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.lot-section-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #1e3c72;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lot-section-desc {
    margin: 0 0 16px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

/* ===== 名前入力 ===== */
.lot-names-area {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.lot-names-area:focus { border-color: #3498db; }

.lot-names-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.btn-tool {
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-tool:hover { background: #e2e8f0; }
.btn-danger { color: #ef4444; border-color: #fca5a5; }
.btn-danger:hover { background: #fee2e2; }
.lot-name-count {
    margin-left: auto;
    font-weight: bold;
    color: #2a5298;
    font-size: 0.9rem;
}

/* ===== モード切り替え ===== */
.lot-mode-tabs {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}
.lot-mode-tab {
    flex: 1;
    padding: 14px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.lot-mode-tab.is-active {
    border-color: #2a5298;
    background: #eef4ff;
    color: #1e3c72;
}
.lot-mode-panel[hidden] { display: none; }

/* ===== 入力欄まわり（discount.css と同じ見た目） ===== */
.input-group { margin-bottom: 20px; }
.input-group label,
.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1e3c72;
}
.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
}

.lot-seat-fields {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.lot-inline-field { flex: 1; min-width: 140px; }
.lot-capacity-note {
    font-size: 0.85rem;
    color: #64748b;
    margin: -8px 0 20px;
}

/* ===== こだわり条件（アドバンス） ===== */
.lot-adv-block { margin-bottom: 24px; }
.lot-adv-block:last-child { margin-bottom: 0; }
.lot-adv-block h3 {
    font-size: 0.95rem;
    color: #334155;
    margin: 0 0 10px;
}
.lot-adv-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.lot-person-select {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #22303f;
    font-size: 0.88rem;
    min-width: 130px;
    flex: 1;
}
.lot-adv-sep {
    color: #94a3b8;
    flex: 0 0 auto;
}
.lot-small-number {
    width: 64px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
}
.lot-adv-unit {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: bold;
}
.btn-adv-add {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #2a5298;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn-adv-add:hover { background: #1e3c72; }

.lot-tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lot-tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 6px 6px 14px;
    font-size: 0.85rem;
    color: #334155;
}
.lot-tag-remove {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lot-tag-remove:hover { background: #cbd5e1; color: #1e293b; }

/* ===== ボタン（discount.css と同じ見た目） ===== */
.btn-group { display: flex; gap: 15px; margin-bottom: 4px; }
.btn-calc {
    flex: 2;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #2a5298;
    color: white;
}
.btn-calc:hover { background-color: #1e3c72; }
.btn-clear-tool {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #e9ecef;
    color: #495057;
}
.btn-clear-tool:hover { background-color: #dee2e6; }

/* ===== シャッフル演出 ===== */
.lot-shuffle-box {
    margin-top: 20px;
    padding: 30px;
    text-align: center;
    background: #f1f3f5;
    border-radius: 8px;
    color: #2a5298;
    font-weight: bold;
    font-size: 1.1rem;
}
.lot-shuffle-box i { margin-right: 10px; }
.lot-shuffle-box[hidden] { display: none; }

/* ===== 結果 ===== */
.lot-result-wrap { margin-top: 20px; }
.lot-result-wrap[hidden] { display: none; }
.lot-result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}
.lot-result-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    color: #1e3c72;
    text-align: center;
}
.lot-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin: 12px 0 0;
}
.lot-warning[hidden] { display: none; }
.lot-result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.lot-result-actions .btn-tool { flex: 1; justify-content: center; }

/* グループ分け結果 */
.lot-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}
.lot-group-card {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    padding: 14px;
}
.lot-group-card-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #2a5298;
    border-bottom: 2px solid #eef4ff;
    padding-bottom: 6px;
}
.lot-group-card-members {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lot-group-card-members li {
    font-size: 0.92rem;
    color: #334155;
}

/* 席替え結果 */
.lot-seat-grid {
    display: grid;
    gap: 8px;
    justify-content: center;
}
.lot-seat-card {
    min-width: 64px;
    min-height: 48px;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #1e3c72;
    padding: 6px;
    word-break: break-all;
}
.lot-seat-card.is-empty { color: #cbd5e1; font-weight: normal; }

/* トースト通知 */
.toast-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast-msg {
    background: rgba(30, 41, 59, 0.9);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast-msg.show { opacity: 1; transform: translateY(0); }

/* === スマホ・タブレット対応 === */
@media (max-width: 768px) {
    .calc-box { padding: 20px; }
    .btn-group { gap: 10px; }
    .btn-calc, .btn-clear-tool { padding: 12px; font-size: 0.95rem; }
    .lot-mode-tab { font-size: 0.85rem; padding: 12px 8px; }
    .lot-adv-add-row { flex-direction: column; align-items: stretch; }
    .lot-person-select { width: 100%; }
    .lot-group-grid { grid-template-columns: 1fr 1fr; }
    .lot-seat-card { min-width: 48px; font-size: 0.75rem; }
}
@media (max-width: 480px) {
    .lot-group-grid { grid-template-columns: 1fr; }
    .lot-result-actions { flex-direction: column; }
}
