.order-tracking {
    max-width: 900px;
    margin: 60px auto;
    padding: 20px 0px;
}

.is-hidden {
    display: none !important;
}

.page-title {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2.5rem;
    text-align: center;
}

.intro-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Order Lookup Form */
.order-lookup {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.order-lookup-form {
    margin: 30px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

.input-wrapper input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.input-wrapper button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 500;
}

.input-wrapper button:hover {
    background: var(--secondary-color);
}

/* Recent Orders */
.recent-orders {
    margin-top: 30px;
}

.recent-orders h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.recent-orders h3:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #eee;
}

#recent-orders {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

#recent-orders li {
    margin-bottom: 10px;
}

#recent-orders a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

#recent-orders a:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.recent-order-info {
    display: flex;
    flex-direction: column;
}

.recent-order-id {
    font-weight: 600;
}

.recent-order-date {
    font-size: 0.9rem;
    color: #777;
}

.recent-order-id small {
    font-size: 0.8rem;
    color: #999;
    font-weight: normal;
}

.recent-order-status {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.status-pending {
    background: #f8f9fa;
    color: #555;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-ready {
    background: #d1e7dd;
    color: #0f5132;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Order Not Found */
.order-not-found {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.order-not-found h2 {
    color: #721c24;
    margin-bottom: 15px;
}

.order-not-found p {
    color: #666;
    margin-bottom: 25px;
}

.order-not-found .button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.order-not-found .button:hover {
    background: var(--secondary-color);
}

/* Order Status */
.order-status {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.order-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.order-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 2rem;
}

.order-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-type-badge.wc-order {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.order-type-badge.restaurant-order {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

.order-progress {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}

.order-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-indicator {
    width: 30px;
    height: 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.progress-step.active .step-indicator {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.progress-step.current .step-indicator {
    border-width: 4px;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.2);
}

.step-label {
    font-size: 0.9rem;
    color: #777;
    transition: all 0.3s ease;
}

.progress-step.active .step-label {
    color: #4a6741;
    font-weight: bold;
}

.step-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

.order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.order-info-section, .order-items-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.order-info-section h3, .order-items-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

.price-value {
    color: var(--primary-color);
}

.items-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.item-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-name {
    margin: 0;
    font-size: 1rem;
}

.item-quantity {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #eee;
}

.total-label {
    font-weight: 600;
    font-size: 1.1rem;
}

.total-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.order-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.refresh-icon {
    width: 16px;
    height: 16px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    transition: transform 0.5s linear;
    margin-right: 8px;
}

.refresh-icon.spinning {
    animation: spin 1s linear infinite;
}

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

#last-refresh-time {
    font-size: 0.85em;
    color: #999;
    margin-left: 5px;
}

.refresh-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.refresh-button:hover {
    background: var(--secondary-color);
}

.refresh-button.refreshing {
    position: relative;
    overflow: hidden;
}

.refresh-button.refreshing:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    animation: refreshPulse 1s linear;
}

@keyframes refreshPulse {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.refresh-icon-btn {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
}

/* Loyalty Points Styling */
.detail-item.loyalty-points {
    background-color: #f8f8f8;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 8px;
    border-left: 3px solid var(--primary-color);
}

.points-value {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
}

.points-breakdown {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.points-breakdown span {
    position: relative;
    padding-left: 15px;
}

.points-breakdown span:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Loyalty Information Styling */
.loyalty-information {
    margin-top: 40px;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.loyalty-information h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    font-size: 1.3rem;
}

.loyalty-note {
    background: #fff3cd;
    color: #856404;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.loyalty-card {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.loyalty-total {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 200px;
}

.loyalty-points-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.points-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.points-label {
    font-size: 1rem;
    color: #666;
}

.points-value-container {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    width: 100%;
}

.points-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 5px;
}

.loyalty-info {
    flex: 1;
    min-width: 250px;
}

.loyalty-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #444;
    font-size: 1.1rem;
}

.loyalty-info p {
    color: #666;
    line-height: 1.5;
}

.redeem-suggestion {
    margin-top: 20px;
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.redeem-suggestion p {
    color: #155724;
    margin-bottom: 10px;
}

.points-needed {
    margin-top: 20px;
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.points-needed p {
    color: #856404;
    margin: 0;
}

.view-account-button {
    display: inline-block;
    padding: 8px 15px;
    background: #155724;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.view-account-button:hover {
    background: #0f3e1a;
    color: white;
}

@media (max-width: 768px) {
    .order-tracking {
        margin: 30px auto;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .order-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-type-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .order-type-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .order-progress {
        flex-direction: column;
        align-items: flex-start;
        margin: 20px 0;
    }
    
    .order-progress::before {
        top: 0;
        bottom: 0;
        left: 15px;
        width: 2px;
        height: auto;
    }
    
    .progress-step {
        display: flex;
        align-items: center;
        margin: 10px 0;
        width: 100%;
    }
    
    .step-indicator {
        margin: 0 15px 0 0;
    }
    
    .step-label {
        text-align: left;
    }
    
    .step-time {
        margin-left: auto;
        margin-top: 0;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .refresh-button {
        width: 100%;
        justify-content: center;
    }
}

.order-ready-notification {
    display: flex;
    align-items: center;
    background-color: #d1e7dd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid #198754;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.notification-icon {
    margin-right: 20px;
    font-size: 2.5rem;
    color: #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25,135,84,0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.notification-content {
    flex: 1;
}

.notification-content h3 {
    margin: 0 0 10px 0;
    color: #0f5132;
    font-size: 1.4rem;
}

.notification-content p {
    margin: 0 0 15px 0;
    color: #0f5132;
    line-height: 1.5;
}

.order-number-display {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    margin-top: 5px;
}

.order-number-label {
    font-weight: 500;
    margin-right: 8px;
    color: #333;
}

.order-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #198754;
}

.progress-step.current.active .step-time {
    font-weight: 600;
    color: #198754;
}

@media (max-width: 768px) {
    .order-ready-notification {
        flex-direction: column;
        text-align: center;
    }
    
    .notification-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Order Type Tabs */
.order-type-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
}

.tab-button:hover:not(.active) {
    background: #e8e8e8;
}
.order-notification-optin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #d7e7d2;
    border-radius: 12px;
    background: #f4faf2;
}

.order-notification-optin strong {
    display: block;
    color: #274d24;
    font-size: 15px;
    margin-bottom: 2px;
}

.order-notification-optin span {
    display: block;
    color: #5f6f5c;
    font-size: 13px;
}

.notification-button {
    white-space: nowrap;
}

.notification-button.is-loading {
    opacity: 0.78;
    cursor: wait;
}

.order-notification-status {
    flex-basis: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.order-notification-status.success {
    background: #e8f6e6;
    color: #1f6f28;
}

.order-notification-status.error {
    background: #fff0f0;
    color: #9f1d1d;
}

@media (max-width: 640px) {
    .order-notification-optin {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-button {
        width: 100%;
    }
}
