/* 搜尋輸入框和按鈕的樣式 */
.search-container {
    display: flex; /* 改變為 flexbox 佈局 */
    flex-direction: row; /* 水平排列 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    gap: 10px; /* 元素間距 */
    margin: 40px auto;
    max-width: 700px; /* 增加最大寬度以容納並排的元素 */
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input-container {
    position: relative;
    flex-grow: 1; /* 讓搜尋輸入框佔據更多空間 */
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 20px;
    border: 2px solid #ddd;
    border-radius: 5px; /* 圓角改為 5px */
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}

.clear-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5em;
    color: #ccc;
    cursor: pointer;
    display: none;
    transition: color 0.2s ease;
}

.clear-icon:hover {
    color: #888;
}

/* 搜尋按鈕直接作為 .search-container 的子元素，不再需要 .search-button-container */
.search-button {
    padding: 12px 20px;
    background-color: #243D51; /* 主要顏色 */
    color: white;
    border: none;
    border-radius: 5px; /* 圓角改為 5px */
    font-size: 1.1em;
    cursor: not-allowed;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* 防止按鈕文字換行 */
}

.search-button.active-search-button {
    background-color: #23396C; /* 重點字體顏色 */
    cursor: pointer;
}

.search-button.active-search-button:hover {
    background-color: #1a2d60; /* 懸停效果 */
    transform: translateY(-2px);
}

/* 標籤按鈕組樣式 */
.tag-button-group {
    display: flex;
    flex-wrap: wrap; /* 允許換行 */
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    max-width: 800px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f0f0f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tag-button {
    padding: 10px 15px;
    border: 1px solid #23396C; /* 邊框顏色 */
    border-radius: 5px; /* 圓角 */
    background-color: transparent; /* 背景透明 */
    color: #23396C; /* 文字顏色 */
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tag-button:hover {
    background-color: rgba(35, 57, 108, 0.1); /* 懸停時半透明效果 */
    border-color: #23396C;
}

.tag-button.active-tag {
    background-color: #23396C; /* 選中時背景色 */
    color: white; /* 選中時文字顏色 */
    border-color: #23396C;
    box-shadow: none; /* 移除陰影 */
}

.tag-button.active-tag:hover {
    background-color: #1a2d60; /* 選中時懸停效果 */
    border-color: #1a2d60;
}

/* 搜尋結果顯示樣式 */
.airport-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px; /* 增加底部間距以容納分隔線 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: white;
}
.airport-card h2 {
    margin-top: 0;
    color: #23396C; /* 重點字體顏色 */
    font-size: 20px; /* 標題字體大小 20px */
    font-weight: bold; /* 標題粗體 */
}
.airport-card h3 {
    color: #23396C; /* 重點字體顏色 */
    font-weight: normal; /* 副標題不粗體 */
    font-size: 18px; /* 副標題字體大小 18px */
    margin-bottom: 15px;
}
.airport-card p {
    margin: 8px 0;
    color: black; /* 其他字體顏色 */
    font-size: 18px; /* 其他內容字體大小 18px */
    font-weight: normal; /* 其他內容不粗體 */
}
.airport-card p strong { /* 確保 p 標籤內的 strong 也不粗體，除非特別要求 */
    font-weight: normal;
}

/* 為分隔線添加一些間距，使其不會緊貼內容 */
hr.card-separator {
    border: 0;
    height: 1px;
    background-color: #eee; /* 淺灰色分隔線 */
    margin: 25px 0; /* 上下間距 */
}

.archived-badge {
    background-color: #f8d7da;
    color: #721c24;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 10px;
}
.search-summary {
    margin-bottom: 20px;
    color: #666;
    font-style: italic;
}
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}
/* 按鈕容器樣式調整 */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background-color: #243D51; /* 主要顏色 */
    color: white;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.action-button:hover {
    background-color: #1a2d60; /* 懸停效果 */
    transform: translateY(-2px);
}

/* 自定義模態框樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 80%;
    max-width: 600px; /* 稍微增加模態框最大寬度 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: left; /* 模態框內容左對齊 */
    position: relative;
}
.modal-content h3 {
    color: #23396C; /* 重點字體顏色 */
    margin-top: 0;
    margin-bottom: 15px;
}
.modal-content p {
    margin-bottom: 10px;
    color: black; /* 其他字體顏色 */
}
.modal-close {
    background-color: #243D51; /* 主要顏色 */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    margin-top: 20px; /* 增加關閉按鈕上邊距 */
}
.modal-close:hover {
    background-color: #1a2d60; /* 懸停效果 */
}
pre {
    background-color: #eee;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace; /* 等寬字體更適合代碼或詳細內容 */
    font-size: 0.9em;
    color: black; /* 其他字體顏色 */
}
.more-details-button {
    background-color: #243D51; /* 主要顏色 */
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    transition: background-color 0.2s ease;
    display: block; /* 讓按鈕獨佔一行 */
    width: fit-content; /* 適應內容寬度 */
    margin-left: auto; /* 靠右 */
}

.more-details-button:hover {
    background-color: #1a2d60; /* 懸停效果 */
}