/*! order-lookup.css - v1.2 Simplified & Direct Display */

.lookup-page {
    background-color: #f7f7f7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.lookup-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 16px;
    padding: 3rem 3rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.lookup-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        #007AFF, #AF52DE, #FF2D55, #FF9500, #34C759, #007AFF
    );
    z-index: -1;
    transform: translate(-50%, -50%);
    animation: none; 
}

.lookup-container:focus-within::before {
    animation: spin-border 5s linear infinite;
}

.lookup-container::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background-color: #fff;
    border-radius: 12px;
    z-index: -1;
}

@keyframes spin-border {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.lookup-card-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #e0e0e0;
}

.card-header-title {
    font-family: var(--font-bold);
    color: #ccc;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#lookup-form-section h1,
#lookup-results-section h2 {
    text-align: center;
    font-family: var(--font-bold);
    margin: 0 0 1rem 0;
    color: #1d1d1f;
}

.subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    color: #333;
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #1d1d1f;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-color, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-family: var(--font-bold);
    color: #fff;
    background-color: var(--brand-color, #007AFF);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-submit:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-submit:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    opacity: 0.7;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-error-message {
    color: #dc3545;
    margin-top: 1rem;
    font-weight: bold;
    min-height: 1.2em;
    text-align: center;
    font-size: 0.9rem;
}

.order-card {
    border: 1px solid #eee;
    background-color: #fafafa;
    border-radius: 8px;
    padding: 1.5rem;
}

/* ✅【新增】为多个订单卡片之间添加间距 */
.order-card + .order-card {
    margin-top: 1.5rem;
}

.order-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #e0e0e0;
    color: #333;
}

.order-detail-item:last-child {
    border-bottom: none;
}

.item-label {
    color: #555;
    font-weight: bold;
    font-size: 0.9rem;
}

.item-value {
    color: #111;
    font-weight: bold;
    font-size: 0.95rem;
}

.item-value[class*="status-"] {
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
}

.status-paid, .status-completed { background-color: #28a745; }
.status-pending { background-color: #ffc107; color: #333; }
.status-failed { background-color: #dc3545; }

/* ✅【修改】将 actions-container 的 margin 移到 order-card 内部 */
.order-card .actions-container {
    margin-top: 1.5rem;
    text-align: center;
}

.actions-container .btn-action {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-family: var(--font-bold);
    color: #fff;
    background-color: var(--brand-color, #007AFF);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.actions-container .btn-action:hover {
    background-color: #0056b3;
}

.actions-container .btn-action + .btn-action {
    margin-top: 1rem;
}

.actions-container p {
    color: #555;
    line-height: 1.6;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.lookup-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    padding: 0.5rem 0;
}

.lookup-footer a {
    color: var(--brand-color, #007AFF);
    text-decoration: none;
}
.lookup-footer a:hover {
    text-decoration: underline;
}

.btn-link {
    background: none;
    border: none;
    color: var(--brand-color, #007AFF);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
}
.btn-link:hover {
    color: #0056b3;
}

@media (max-width: 768px) {
    .lookup-container {
        padding: 2.5rem 1.5rem;
    }
    .card-header-title { font-size: 0.7rem; }
    .subtitle { font-size: 0.9rem; }
    .form-group label { font-size: 0.85rem; }
    .form-group input { font-size: 0.95rem; }
    .btn-submit { font-size: 1.1rem; }
    .lookup-footer { font-size: 0.75rem; }
}