/* ============================================================
   BL Order Tracking - Frontend Styles
   ============================================================ */

/* --- Yellow Theme Color --- */
:root {
    --bl-yellow: #FFC107;
    --bl-yellow-dark: #E6AC00;
    --bl-yellow-light: #FFF3CD;
}

.bl-tracking-wrapper {
    width: 100%;
}

/* --- Header Section (上部分) --- */
.bl-tracking-header {
    text-align: center;
    padding: 20px 0 30px;
    margin: 0 -15px;
}

.bl-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #f59e0b;
}

.bl-header-icon svg {
    width: 56px;
    height: 56px;
}

.bl-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.bl-header-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* 隐藏页面标题 H1 - 使用主题通用的选择器 */
h1.entry-title,
h1.page-title,
h1.post-title,
.single h1,
.page h1 {
    display: none;
}

/* --- Inline Search Form --- */
.bl-tracking-search-form {
    display: flex;
    justify-content: center;
    padding: 24px 15px;
    margin: 0 -15px;
}

.bl-search-input-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.bl-search-input-wrap:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.bl-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

.bl-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 14px;
    background: transparent;
    min-width: 0;
}

.bl-search-input::placeholder {
    color: #9ca3af;
}

.bl-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
    background: #f59e0b;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.bl-search-btn:hover {
    background: #d97706;
}

.bl-search-btn:disabled {
    background: #fcd34d;
    cursor: not-allowed;
}

.bl-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-spinner {
    animation: bl-spin 1s linear infinite;
}

@keyframes bl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Result Cards --- */
.bl-results-count {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.bl-results-list {
    margin-top: 24px;
}

.bl-result-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    margin-top: 20px;
    overflow: hidden;
    animation: blSlideIn 0.3s ease;
}

.bl-result-card:first-child {
    margin-top: 0;
}

@keyframes blSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bl-result-card .card-header {
    background: linear-gradient(135deg, #FFC107 0%, #E6AC00 100%);
    color: #212529;
    padding: 16px 20px;
    border: none;
}

.bl-result-card .card-header h5 {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.bl-result-card .card-body {
    padding: 20px;
}

.bl-info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
}

.bl-info-row:last-child {
    border-bottom: none;
}

.bl-info-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.bl-info-value {
    flex: 1;
    color: #212529;
}

.bl-info-order {
    font-weight: 700;
    color: #E6AC00;
    font-size: 1rem;
}

.bl-tracking-code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #E6AC00;
    background: #FFF3CD;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.bl-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 0.85rem;
    transition: all 0.2s;
    vertical-align: middle;
    color: #FFC107;
    border-radius: 4px;
}

.bl-copy-btn:hover {
    color: #E6AC00;
    background: #FFF3CD;
}

.bl-tracking-note {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 6px;
    line-height: 1.5;
}

.bl-tracking-note a {
    color: #FFC107;
    text-decoration: none;
}

.bl-tracking-note a:hover {
    color: #E6AC00;
}

/* --- No Results / Error --- */
.bl-no-results {
    text-align: center;
    padding: 2rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.bl-no-results h5 {
    color: #495057;
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.bl-no-results p {
    color: #6c757d;
}

.bl-no-results p a {
    color: #FFC107;
}

/* --- Loading Spinner --- */
.bl-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.bl-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 193, 7, 0.2);
    border-top-color: #FFC107;
    border-radius: 50%;
    animation: bl-spin 0.8s linear infinite;
}

/* --- Responsive --- */
@media (max-width: 576px) {
    .bl-header-title {
        font-size: 1.4rem;
    }

    .bl-info-row {
        flex-direction: column;
        gap: 4px;
    }

    .bl-info-label {
        flex: none;
        font-size: 0.8rem;
        color: #6c757d;
    }

    .bl-tracking-code {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}
