/* raid-reward-calculator.css */

.raid-reward-calculator-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

/* モード選択のラジオボタン */
.rrc-mode-selection {
    display: flex;
    flex-wrap: wrap; /* 小さい画面で折り返す */
    justify-content: flex-start; /* 左寄せにする */
    gap: 15px; /* ボタン間の隙間 */
    margin-bottom: 30px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.rrc-radio-option {
    background-color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex: 1 1 calc(50% - 15px);
    max-width: calc(50% - 15px);
}

.rrc-radio-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.rrc-radio-option:hover {
    background-color: #e0e6e9;
}

.rrc-radio-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #3498db;
    transform: scale(1.1);
}

.rrc-radio-option input[type="radio"]:checked + label {
    font-weight: bold;
    color: #2c3e50;
}

/* 入力グループ */
.rrc-input-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #fdfdfd;
    transition: all 0.3s ease-in-out;
}

.rrc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
    font-size: 0.95em;
}

.rrc-input-field {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rrc-input-field:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 計算ボタン */
#rrc-calculate-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 25px;
}

#rrc-calculate-button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

#rrc-calculate-button:active {
    transform: translateY(0);
}

/* 計算結果表示エリア */
#rrc-results {
    margin-top: 30px;
    padding: 20px;
    border: 1px dashed #cccccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    min-height: 50px;
    color: #333;
    line-height: 1.8;
}

#rrc-results h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#rrc-results ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

#rrc-results ul li {
    padding: 5px 0;
    border-bottom: 1px dotted #e0e0e0;
    font-size: 0.95em;
}

#rrc-results ul li:last-child {
    border-bottom: none;
}

/* エラーメッセージのスタイル */
.rrc-error-message {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    border: 1px solid #e74c3c;
    background-color: #fde8e8;
    padding: 10px;
    border-radius: 5px;
}

/* 全報酬一覧テーブル */
#rrc-reward-list-container {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fdfdfd;
}

#rrc-reward-list-container h3 {
    text-align: center;
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.rrc-table-wrapper {
    overflow-x: auto; /* 横方向のスクロールを有効にする (念のため残す) */
    -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかにする */
}

#rrc-reward-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 0; /* テーブルが内容に応じて柔軟に縮むようにする */
}

#rrc-reward-list-table th,
#rrc-reward-list-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap; /* セルの内容が改行されないようにする（デフォルト） */
    font-size: 1em; /* デフォルトのフォントサイズ (PC用) */
}

/* 2列目のセル (褒賞(個人)) のみ、スマホ表示でテキストを折り返す */
@media (max-width: 768px) {
    #rrc-reward-list-table td:nth-child(2),
    #rrc-reward-list-table th:nth-child(2) { /* ヘッダーも折り返し対象に */
        white-space: normal; /* テキストを折り返す */
        word-break: break-word; /* 長い単語でも途中で改行 */
    }
}

#rrc-reward-list-table th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

#rrc-reward-list-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

#rrc-reward-list-table tbody tr:hover {
    background-color: #e6f2fa;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .raid-reward-calculator-container {
        padding: 15px;
        margin: 15px;
    }
    .rrc-mode-selection {
        flex-direction: column;
        gap: 10px;
    }
    .rrc-radio-option {
        width: 100%;
        max-width: none;
        flex-basis: auto;
        justify-content: flex-start;
    }
    .rrc-radio-option label {
        padding: 0 5px;
    }
    .rrc-radio-option input[type="radio"] {
        margin-left: 0;
        margin-right: 8px;
    }
    #rrc-calculate-button {
        padding: 10px 15px;
        font-size: 1em;
    }

    /* タブレット縦向き/大きめのスマホ (768px未満) でのテーブル表示調整 */
    #rrc-reward-list-table th,
    #rrc-reward-list-table td {
        font-size: 0.8em; /* フォントサイズを小さくする */
        padding: 6px 8px; /* パディングを減らす */
    }
}

@media (max-width: 480px) {
    /* 一般的なスマホ (480px未満) でのテーブル表示調整 */
    #rrc-reward-list-table th,
    #rrc-reward-list-table td {
        font-size: 0.6em; /* フォントサイズをさらに小さく */
        padding: 2px 4px; /* パディングもさらに減らす */
    }
}