/* イベントトリガー一覧ページ - Bootstrap拡張 */

body {
    background: #f5f5f5;
}

/* メインコンテナ */
.container {
    background: white;
    border: 1px solid var(--gov-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px auto;
    padding: 0;
}

/* ヘッダー */
h1 {
    background: var(--gov-primary);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: normal;
    border-bottom: 2px solid var(--gov-primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

h1 i {
    font-size: 1rem;
}

.subtitle {
    background: var(--gov-light);
    color: #495057;
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 13px;
    border-bottom: 1px solid var(--gov-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.subtitle i {
    color: #6c757d;
    font-size: 13px;
}

/* 検索ボックス */
.search-box {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--gov-border);
    position: relative;
}

.search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--gov-border);
    font-size: 13px;
    border-radius: 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--gov-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* フィルタータブ */
.filter-tabs {
    display: flex;
    background: #495057;
    border-bottom: 1px solid var(--gov-border);
}

.filter-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    border-right: 1px solid #6c757d;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.filter-tab:last-child {
    border-right: none;
}

.filter-tab:hover {
    background: #6c757d;
}

.filter-tab.active {
    background: var(--gov-primary);
}

.filter-tab i {
    font-size: 12px;
}

/* イベントセクション */
.event-section {
    margin: 0;
}

.event-section h2 {
    background: var(--gov-light);
    color: #495057;
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: normal;
    border-left: 4px solid var(--gov-primary);
    border-bottom: 1px solid var(--gov-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-section h2 i {
    font-size: 14px;
    color: #6c757d;
}

.description {
    background: #fff3cd;
    border: none;
    border-left: 4px solid var(--gov-warning);
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--gov-border);
}

.description i {
    font-size: 12px;
}

/* イベントグリッド（Bootstrapカード使用） */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.event-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: white;
    font-size: 13px;
    font-weight: normal;
    border-radius: 0;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.event-link i {
    margin-right: 6px;
    font-size: 14px;
}

/* イベントタイプ別スタイル */
.event-link.monster {
    background: var(--gov-warning);
    border-color: #e8650e;
}

.event-link.monster:hover {
    background: #e8650e;
    border-color: #e8650e;
}

.event-link.sabotage {
    background: var(--gov-danger);
    border-color: #c82333;
}

.event-link.sabotage:hover {
    background: #c82333;
    border-color: #c82333;
}

.event-link.support {
    background: var(--gov-success);
    border-color: #1e7e34;
}

.event-link.support:hover {
    background: #1e7e34;
    border-color: #1e7e34;
}

.amount-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.2);
    color: white;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 2px;
}

/* 検索結果なし */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    background: var(--gov-light);
    margin: 0;
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #adb5bd;
}

/* カスタムリンク説明セクション */
.custom-link-section {
    background: #d1ecf1;
    border: none;
    border-left: 4px solid #17a2b8;
    padding: 1rem 1.5rem;
    margin: 0;
    border-top: 1px solid var(--gov-border);
}

.custom-link-section h3 {
    color: #0c5460;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-link-section p {
    font-size: 13px;
    color: #0c5460;
    margin: 0.5rem 0;
}

.param-list {
    list-style: none;
    margin: 0.75rem 0;
    padding: 0;
    font-size: 13px;
}

.param-list li {
    padding: 0.25rem 0;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 6px;
}

.param-list li i {
    font-size: 10px;
    color: #17a2b8;
}

code {
    background: rgba(0,0,0,0.1);
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 2px;
    font-family: monospace;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border: none;
    }

    h1 {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .search-box, .subtitle, .custom-link-section {
        padding: 0.75rem 1rem;
    }

    .filter-tabs {
        flex-direction: column;
    }

    .filter-tab {
        border-right: none;
        border-bottom: 1px solid #6c757d;
    }

    .filter-tab:last-child {
        border-bottom: none;
    }

    .event-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .event-link {
        font-size: 12px;
        padding: 0.5rem 0.75rem;
    }

    .no-results {
        padding: 2rem 1rem;
    }
}

/* カスタム発火フォームセクション */
.custom-form-section {
    background: #e8f4fd;
    border: none;
    border-left: 4px solid var(--gov-primary);
    padding: 1rem 1.5rem;
    margin: 0 0 1px 0;
    border-bottom: 1px solid var(--gov-border);
}

.custom-form-section h3 {
    color: var(--gov-primary);
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label-gov {
    font-weight: bold;
    color: #495057;
    font-size: 13px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label-gov i {
    font-size: 12px;
    color: var(--gov-primary);
}

.form-control-gov {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gov-border);
    font-size: 13px;
    border-radius: 0;
    background: white;
}

.form-control-gov:focus {
    outline: none;
    border-color: var(--gov-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* ラジオボタンカスタム */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gov-border);
    background: white;
    transition: all 0.2s;
    font-size: 13px;
}

.radio-option:hover {
    background: var(--gov-light);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gov-border);
    border-radius: 50%;
    position: relative;
    background: white;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--gov-primary);
    background: var(--gov-primary);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.radio-option input[type="radio"]:checked ~ i {
    color: var(--gov-primary);
}

/* 金額ボタン */
.amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.amount-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gov-border);
    background: white;
    color: #495057;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.amount-btn:hover {
    background: var(--gov-light);
    border-color: var(--gov-primary);
}

.amount-btn.active {
    background: var(--gov-primary);
    border-color: var(--gov-primary-dark);
    color: white;
    font-weight: bold;
}

/* フォームアクション */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gov-border);
    margin-top: 1rem;
}

.form-actions button {
    padding: 0.6rem 1.2rem;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
}

.form-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions button i {
    font-size: 12px;
}

/* 金額入力 */
.form-control-gov[type="number"] {
    -moz-appearance: textfield;
}

.form-control-gov[type="number"]::-webkit-outer-spin-button,
.form-control-gov[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 金額提案ボタン */
.amount-suggestions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gov-border);
}

.suggestion-label {
    font-size: 11px;
    color: #6c757d;
    display: block;
    margin-bottom: 0.5rem;
}

.amount-suggestion-btn {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    border: 1px solid var(--gov-border);
    background: white;
    color: #495057;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    border-radius: 2px;
}

.amount-suggestion-btn:hover {
    background: var(--gov-light);
    border-color: var(--gov-primary);
}

.amount-suggestion-btn:active {
    background: var(--gov-primary);
    color: white;
}

/* レスポンシブ対応（フォーム用） */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .radio-group {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .amount-suggestions {
        margin-top: 0.375rem;
        padding-top: 0.375rem;
    }
    
    .amount-suggestion-btn {
        font-size: 10px;
        padding: 0.2rem 0.4rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .custom-form-section {
        padding: 0.75rem 1rem;
    }
}