/* =====================================================================
 * キャラクター候補
 * ===================================================================== */

/* 候補一覧行 */
.candidate_list_row {
    cursor: pointer;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
}
.candidate_list_row:hover {
    background-color: #f5f5f5;
}

/* 仮登録バッジ */
.candidate_badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
}
.candidate_badge--pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.candidate_badge--promoted {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

/* 投票エリア */
.candidate_vote_area {
    margin: 12px 0;
    padding: 10px 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.candidate_vote_label_row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.candidate_vote_label_row .candidate_vote_label {
    margin-bottom: 0;
}
.candidate_vote_edit_link {
    font-size: 12px;
    color: #aaa;
    text-decoration: underline;
}
.candidate_vote_edit_link:hover {
    color: #ccc;
}
.candidate_vote_label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
}

/* 投票ボタン */
.candidate_vote_btn {
    display: inline-block;
    padding: 6px 16px;
    margin-right: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s;
}
.candidate_vote_btn:hover {
    background: #e8e8e8;
}
.candidate_vote_btn--positive.candidate_vote_btn--active {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: bold;
}
.candidate_vote_btn--negative.candidate_vote_btn--active {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    font-weight: bold;
}


/* ===== トップページ 説明ヘッダー ===== */
.candidate_header {
    padding: 10px 12px 8px;
    background: rgba(20, 30, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.candidate_header_title {
    font-size: 14px;
    font-weight: bold;
    color: whitesmoke;
    margin-bottom: 4px;
}

.candidate_header_desc {
    font-size: 12px;
    color: #aaa;
    line-height: 1.7;
    text-align: center;
}

.candidate_header_vote_hint {
    color: whitesmoke;
    font-weight: bold;
}

/* ===== トップページ カード行 ===== */
.candidate_cards_row {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 30, 42, 0.6);
}

.candidate_cards_row .candidate_card {
    margin-right: 8px;
}

.candidate_card {
    width: 180px;
    box-sizing: border-box;
    overflow: hidden;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(40, 57, 76, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.candidate_card_series {
    font-size: 13px;
    text-align: center;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.candidate_card_name {
    font-size: 17px;
    font-weight: bold;
    color: whitesmoke;
    text-align: center;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.candidate_card .candidate_vote_area {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

/* 詳細ビュー内の投票エリア（カード外）はダーク背景 */
.character_details_wrap .candidate_vote_area {
    background: rgba(40, 57, 76, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}
.character_details_wrap .candidate_vote_label {
    color: whitesmoke;
}

.candidate_card_btns_wrap {
    position: relative;
    display: block;
    text-align: center;
}
.candidate_card_btns_wrap.is-hidden { display: none; }

.candidate_card_btns {
    display: flex;
    gap: 6px;
    margin-bottom: 5px;
}
.candidate_card .candidate_card_btns {
    margin-bottom: 0;
}

.candidate_card .candidate_vote_btn,
.candidate_vote_area .candidate_card_btns .candidate_vote_btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-size: 26px;
    font-weight: bold;
    margin-right: 0;
    border-radius: 6px;
    line-height: 1;
}

.candidate_card .candidate_vote_btn--positive,
.candidate_vote_area .candidate_card_btns .candidate_vote_btn--positive {
    background-color: transparent;
    border-color: #66bb6a;
    color: #66bb6a;
}

.candidate_card .candidate_vote_btn--negative,
.candidate_vote_area .candidate_card_btns .candidate_vote_btn--negative {
    background-color: transparent;
    border-color: #ef9a9a;
    color: #ef9a9a;
}

.candidate_card .candidate_vote_btn--positive:hover,
.candidate_vote_area .candidate_card_btns .candidate_vote_btn--positive:hover {
    background-color: rgba(102, 187, 106, 0.15);
}

.candidate_card .candidate_vote_btn--negative:hover,
.candidate_vote_area .candidate_card_btns .candidate_vote_btn--negative:hover {
    background-color: rgba(239, 154, 154, 0.15);
}

/* 詳細確認を促すオーバーレイ */
.candidate_details_overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 40, 54, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    color: whitesmoke;
    white-space: nowrap;
    cursor: pointer;
    opacity: 1;
    transition: opacity 2s ease;
}
.candidate_details_overlay.is-hidden { display: none; }
.candidate_details_overlay:hover {
    background: rgba(27, 40, 54, 0.70);
}
.candidate_details_overlay.is-fading {
    opacity: 0;
    pointer-events: none;
}

/* 未ログイン時のオーバーレイ */
.candidate_no_login {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(27, 40, 54, 0.90);
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    border-radius: 3px;
}
.candidate_no_login.is-hidden { display: none; }

/* =====================================================================
 * 候補詳細ビュー
 * ===================================================================== */

/* 詳細モーダル内の説明文 */
.candidate_detail_desc {
    padding: 8px 16px;
    background: rgba(27, 40, 54, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: #aaa;
    line-height: 1.7;
    text-align: center;
}

/* 外枠 */
.candidate_detail_wrap {
    background: rgba(16, 24, 34, 0.96);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ヘッダー */
.candidate_detail_header {
    padding: 14px 16px 16px;
    background: rgba(27, 40, 54, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.candidate_detail_header_bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.candidate_detail_name {
    font-size: 22px;
    font-weight: bold;
    color: whitesmoke;
    text-align: center;
    letter-spacing: 0.03em;
}

.candidate_detail_series {
    margin-top: 6px;
    font-size: 13px;
    color: #8eaabf;
    text-align: center;
}

/* 愛称・別名・基本情報グリッドは character_detail_view の detail_rows / detail_compact_group スタイルを使用 */

/* 候補詳細 編集ボタン */
.btn_candidate_edit:not(.is-hidden) {
    display: inline-block;
}
.btn_candidate_edit {
    padding: 2px 10px;
    border: 1px solid rgb(59, 124, 50);
    border-radius: 4px;
    font-size: 13px;
    color: rgb(59, 124, 50);
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    transition: background 0.15s;
}
.btn_candidate_edit:hover {
    background: rgba(59, 124, 50, 0.12);
}

/* 投票後お礼カード */
.candidate_vote_thanks {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-size: 11px;
    font-weight: bold;
    color: #66bb6a;
    background: rgba(102, 187, 106, 0.1);
    border: 1px solid rgba(102, 187, 106, 0.3);
    border-radius: 6px;
    text-align: center;
}
.candidate_vote_thanks.is-hidden { display: none; }
