/* 貨件狀態查詢頁面樣式 */

/* Reset - 全局重置 */
.query-status-page,
.query-status-page *,
.query-status-page *::before,
.query-status-page *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body 基礎樣式 */
body.query-status-page {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft JhengHei", "PingFang TC", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ASP.NET Form 元素樣式 - 重要！ */
.query-status-page form,
.query-status-page #form1 {
    display: block;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: transparent;
}

/* HTML5 語意標籤明確 display 屬性 */
.query-status-page nav,
.query-status-page main,
.query-status-page section,
.query-status-page footer,
.query-status-page header,
.query-status-page article {
    display: block;
}

/* 隱藏 ASP.NET ViewState 等隱藏欄位 */
.query-status-page input[type="hidden"] {
    display: none !important;
}

/* 導航列 */
.qs-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    height: 60px;
}

.qs-navbar-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qs-navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.qs-navbar-logo img {
    height: 32px;
    width: auto;
}

.qs-navbar-logo span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.qs-navbar-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.qs-navbar-menu li {
    position: relative;
}

.qs-navbar-menu li a {
    display: block;
    padding: 18px 0;
    color: #666;
    text-decoration: none;
    font-size: 15px;
}

.qs-navbar-menu li a:hover {
    color: #d9534f;
}

.qs-navbar-menu li a.active {
    color: #d9534f;
    border-bottom: 3px solid #d9534f;
}

.qs-navbar-right a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

/* 主要內容 */
.qs-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* 查詢區塊 */
.qs-search-section {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qs-search-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.qs-search-header>div {
    flex: 1;
}

.qs-search-title {
    font-size: 28px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
}

.qs-search-subtitle {
    font-size: 14px;
    color: #666;
}

.qs-search-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-left: 20px;
}

/* 搜尋表單 */
.qs-search-form {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}

.qs-input-wrapper {
    flex: 1;
    position: relative;
}

.qs-input-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background-color: #fff;
    padding: 0 6px;
    font-size: 12px;
    color: #888;
    z-index: 1;
}

.qs-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

.qs-search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    background-color: #fff;
}

.qs-search-input:focus {
    border-color: #d9534f;
}

.qs-search-btn {
    height: 48px;
    padding: 0 24px;
    background-color: #d9534f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.qs-search-btn:hover {
    background-color: #c9302c;
}

/* 提示 */
.qs-hints {
    margin-top: 16px;
}

.qs-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.qs-hint-icon {
    width: 16px;
    height: 16px;
    color: #999;
    flex-shrink: 0;
}

/* 結果區塊 */
.qs-results-section {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qs-results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.qs-results-indicator {
    width: 4px;
    height: 20px;
    background-color: #d9534f;
    border-radius: 2px;
    flex-shrink: 0;
}

.qs-results-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.qs-scancode-value {
    color: #333;
}

.qs-copy-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
}

.qs-copy-btn:hover {
    color: #d9534f;
}

.qs-copy-btn svg {
    width: 18px;
    height: 18px;
}

/* 委外連結 */
.qs-outsourcing {
    margin-bottom: 16px;
}

.qs-outsourcing-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #d9534f;
    border-radius: 4px;
    color: #d9534f;
    text-decoration: none;
    font-size: 14px;
}

.qs-outsourcing-link:hover {
    background-color: #d9534f;
    color: #fff;
}

/* 表格 */
.qs-status-table {
    width: 100%;
    border-collapse: collapse;
}

.qs-status-table th {
    background-color: #f8f8f8;
    padding: 12px 16px;
    text-align: left;
    font-weight: normal;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
}

.qs-status-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.qs-status-table tbody tr:last-child td {
    border-bottom: none;
}

/* 無資料 */
.qs-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* 錯誤 */
.qs-error-section {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 20px;
    text-align: center;
}

.qs-error-text {
    color: #d9534f;
    font-size: 14px;
}

/* 行銷區塊 */
.qs-promo {
    background: linear-gradient(135deg, #fce8e6 0%, #f8d7da 100%);
    border-radius: 8px;
    padding: 40px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-height: 220px;
    overflow: hidden;
}

.qs-promo-content {
    flex: 0 0 45%;
    max-width: 45%;
}

.qs-promo-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.qs-promo-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.qs-promo-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid #d9534f;
    border-radius: 4px;
    color: #d9534f;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    background-color: #fff;
}

.qs-promo-btn:hover {
    background-color: #d9534f;
    color: #fff;
}

.qs-promo-image {
    flex: 0 0 90%;
    max-width: 80%;
    height: 60%;
    object-fit: contain;
    object-position: right center;
}

/* 頁尾 */
.qs-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

/* 載入遮罩 */
.qs-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.qs-loading-overlay.active {
    display: flex;
}

.qs-loading-content {
    text-align: center;
}

.qs-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #d9534f;
    border-radius: 50%;
    animation: qs-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes qs-spin {
    to {
        transform: rotate(360deg);
    }
}

.qs-loading-content p {
    color: #666;
    font-size: 14px;
}

/* 響應式 */
@media (max-width: 768px) {

    .qs-navbar-menu,
    .qs-navbar-right {
        display: none;
    }

    .qs-search-section,
    .qs-results-section {
        padding: 20px;
    }

    .qs-search-header {
        flex-direction: column;
    }

    .qs-search-icon {
        display: none;
    }

    .qs-search-form {
        flex-direction: column;
    }

    .qs-search-btn {
        width: 100%;
    }

    .qs-promo {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        min-height: auto;
    }

    .qs-promo-content {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .qs-promo-image {
        flex: 0 0 auto;
        max-width: 80%;
        margin-top: 20px;
    }
}