:root {
    /* カスタムプロパティ（変数）の定義 */
    --color-blue: #007bff;
    --color-light-blue: #f0f8ff;
    --color-green: #28a745;
    --color-light-green: #eaf7ea;
    --color-orange: #ff8c00;
    --color-light-orange: #fff5e6;
    --color-red: #ff0000;
    --color-light-red: #ffe6e6;
    --color-black: #000000;
    --color-light-gray: #f2f2f2;
    --color-white: #ffffff;
    --font-size: 16px;
    --padding-small: 3px;
    --margin-small: 5px;
    --border-radius: 5px;
    --transition-duration: 0.3s;
    --width-default: 140px;
    --height-default: 30px;
    --height-text-default: 23px;
    --line-height-default: 1.5;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden; 
}


#suggestionsDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px; /* 丸みの追加 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* ドロップダウンに影を追加 */
}

#suggestionsDropdown .dropdown-item {
    padding: 8px 15px;
    font-size: 16px;
    color: #343a40;
    border-radius: 10px; /* 各項目も丸み */
}

#suggestionsDropdown .dropdown-item:hover {
    background-color: var(--color-light-blue, #e7f1ff); /* カスタムカラー */
    color: var(--color-blue, #007bff);
}

#productDetails {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.container-fluid {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    margin-left: 30px;
    margin-right: 30px;
    width: auto;
    min-height: calc(100vh - 60px);
    box-sizing: border-box;
}


.card{
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.arrow {
    width: 50px; 
    height: auto; 
    display: block;
    margin: 20px auto; 
}

.table.table th {
    background-color: var(--color-light-blue);
    color: var(--color-blue);
    font-weight: bold;
    padding: 10px;
    border-top: none !important;
    border-bottom: 2px solid;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
}

.table.table td {
    background-color: var(--color-white);
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
}

.table.table-hover td, .table.table-hover th {
    border-left: none;
    border-right: none;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.result_name {
    text-align: center;          /* テキストを中央揃え */
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.result_text {
    color: red;                  /* drugData部分のみ赤色 */
    font-weight: bold;
}


#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loading img {
    width: 100px;
    height: auto;
}


 /* モーダル全体の背景 */
 .modal {
    display: none; /* 初期は非表示 */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* 半透明の背景 */
}

/* モーダルコンテンツ */
.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 8px;
    text-align: left;
}

/* 閉じるボタン */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* スマートフォン対応のためのメディアクエリ */
@media (max-width: 768px) {
    :root {
        --font-size: 14px;
        --padding-small: 2px;
        --margin-small: 3px;
        --width-default: 100px;
        --height-default: 25px;
        --height-text-default: 20px;
    }

    #suggestionsDropdown .dropdown-item {
        font-size: 14px;
    }

    .container-fluid {
        padding: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .card {
        padding: 10px;
    }

    .site_title {
        font-size: 1.2em;
    }

    #productDetails {
        font-size: 0.9em;
    }

    .arrow {
        width: 30px; /* スマートフォン用に矢印サイズを小さく */
    }
}
