/* SNMP Trap プロファイル作成ツール専用スタイル */

/* 情報セクション */
.info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

.info-content ol {
    margin: 0;
    padding-left: 1.5rem;
}

.info-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.info-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* テキストエリア */
textarea {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    background: #f8f9fa;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--focus-color);
    box-shadow: var(--focus-shadow);
}

textarea[readonly] {
    background: #1e1e1e;
    color: #d4d4d4;
    border-color: #333;
}

/* 入力フィールド */
input[type="text"], select {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    background: #f8f9fa;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--focus-color);
    box-shadow: var(--focus-shadow);
}

/* セレクトボックス */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ボタングループ */
.button-group {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 200px;
}

/* 統計情報セクション */
.stats-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 1px solid #28a745;
    border-radius: var(--border-radius-small);
    padding: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius-small);
}

.stat-label {
    font-weight: 500;
    color: #333;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    min-width: 2rem;
    text-align: center;
}

/* 結果表示エリア */
.result-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* エラー表示エリア */
.error-area {
    margin-top: 1rem;
}

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius-small);
    padding: 1rem;
    color: var(--error-color);
    font-weight: 500;
}

/* 成功メッセージ */
.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    border-radius: var(--border-radius-small);
    padding: 1rem;
    color: var(--success-color);
    font-weight: 500;
    margin-top: 1rem;
}

/* 入力フィールドの必須表示 */
.required::after {
    content: " *";
    color: var(--error-color);
}

/* プレースホルダーのスタイル */
textarea::placeholder, input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* ローディング表示 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 小さなヘルプテキスト */
small {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* フォーカス可能要素のアクセシビリティ改善 */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        min-width: auto;
    }
    
    textarea {
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .result-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    textarea {
        font-size: 0.75rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .info-content ol {
        padding-left: 1rem;
    }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    textarea, input, select {
        border-width: 2px;
    }
    
    .info-section {
        border-left-width: 6px;
    }
    
    .stat-value {
        border: 1px solid var(--success-color);
    }
}

/* ダークモード対応の準備 */
@media (prefers-color-scheme: dark) {
    textarea, input[type="text"], select {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    textarea[readonly] {
        background: #1a202c;
        color: #cbd5e0;
    }
    
    .info-section {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        color: #e2e8f0;
    }
    
    .stats-section {
        background: linear-gradient(135deg, #2d5016 0%, #38a169 100%);
        border-color: #38a169;
    }
    
    .stat-item {
        background: rgba(45, 55, 72, 0.8);
        color: #e2e8f0;
    }
}

/* エラー表示スタイル */
.error {
    border-color: var(--error-color) !important;
    background-color: rgba(255, 68, 68, 0.05) !important;
}