/* ==========================
   リセットと基本スタイル
========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fdf6e3;
    padding-top: 240px; /* ヘッダー(120px) + ウィジェット(60px) + タブ(60px)の高さ */
    overflow-x: hidden;
    overflow-y: hidden; /* ページ本体はスクロール不可 */
    height: 100vh; /* 画面の高さに合わせる */
    position: fixed; /* 位置を固定して不要なスクロールを防止 */
    width: 100%;
}

body.search-results-visible {
    /* 検索結果表示時も同じpadding-topを維持 */
    padding-top: 240px;
    overflow-y: hidden; /* ページ本体はスクロール不可 */
    height: 100vh;
}

/* カラーパレット */
:root {
    --primary-color: #C5A572;
    --secondary-color: #4b6584;
    --accent-color: #3490dc;
    --text-color: #333;
    --light-bg: #fdf6e3;
    --card-bg: #ffffff;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --border-color: #ddd;
    
    /* Z-index の体系的管理 */
    --z-header: 1000;
    --z-tabs: 900;
    --z-widgets: 950;
    --z-content: 10;
    --z-modal: 2000;
    --z-dropdown: 1500;
    --z-tooltip: 1800;
    --z-browser-warning: 10000;
}

/* サポート対象外ブラウザ警告メッセージ */
#unsupported-browser-warning {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #e74c3c !important;
    color: white !important;
    padding: 15px !important;
    text-align: center !important;
    z-index: var(--z-browser-warning) !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
    border-bottom: 3px solid #c0392b !important;
}

#unsupported-browser-warning .warning-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
}

#unsupported-browser-warning .warning-title {
    font-weight: bold !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
}

#unsupported-browser-warning .warning-message {
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

#unsupported-browser-warning .warning-recommendation {
    margin-bottom: 12px !important;
    font-size: 13px !important;
}

#unsupported-browser-warning .warning-close-button {
    background-color: #c0392b !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    transition: background-color 0.3s ease !important;
}

#unsupported-browser-warning .warning-close-button:hover {
    background-color: #a93226 !important;
}

/* 警告メッセージ表示時のbody調整 */
body.browser-warning-visible {
    padding-top: calc(240px + 120px) !important; /* 元のpadding + 警告メッセージの高さ */
}

/* テキスト配置ユーティリティ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* テキストスタイル */
.whats-new1, .annotation {
    font-size: 1.1em;
    color: rgb(241 0 0);
    font-style: bold;
    display: flex;
    justify-content: center;
}

.whats-new2, .annotation {
    font-size: 1.1em;
    color: rgb(4 112 243);
    font-style: normal;
    display: flex;
    justify-content: center;
}

/* フォーカスアウトライン - 検索結果表示時には非表示 */
*:focus {
    outline: none; /* アウトラインを非表示に変更 */
}

/* 特定要素のフォーカス時のスタイルはここで指定 */
input:focus, button:focus, a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* 検索結果表示時に特にタブコンテンツのアウトラインを非表示に */
body.search-results-visible div:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* レスポンシブ設定 */
@media (max-width: 768px) {
    body {
        padding-top: 200px;
    }
    
    body.search-results-visible {
        padding-top: 200px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 180px;
    }
    
    body.search-results-visible {
        padding-top: 180px;
    }
} 