/**
 * Order Lookup Modal Styles
 * Used by standard.html and special.html for customers to check order status
 */

/* Modal Overlay */
.lookup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lookup-modal.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.lookup-modal-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.lookup-modal-header {
    background: linear-gradient(135deg, #e85486 0%, #d9436c 100%);
    color: #fff;
    padding: 24px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.lookup-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.lookup-modal-header p {
    margin: 8px 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.lookup-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lookup-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Body */
.lookup-modal-body {
    padding: 24px;
}

/* Search Form */
.lookup-search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lookup-input-group {
    position: relative;
}

.lookup-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.lookup-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.lookup-input-group input:focus {
    outline: none;
    border-color: #e85486;
    box-shadow: 0 0 0 3px rgba(232, 84, 134, 0.1);
}

.lookup-input-group input::placeholder {
    color: #aaa;
}

.lookup-search-btn {
    background: linear-gradient(135deg, #e85486 0%, #d9436c 100%);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lookup-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 84, 134, 0.3);
}

.lookup-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.lookup-loading {
    display: none;
    text-align: center;
    padding: 32px 0;
}

.lookup-loading.active {
    display: block;
}

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

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

/* Results Section */
.lookup-results {
    display: none;
}

.lookup-results.active {
    display: block;
}

/* Empty State */
.lookup-empty {
    text-align: center;
    padding: 24px;
}

.lookup-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.lookup-empty h3 {
    margin: 0 0 8px;
    color: #555;
}

.lookup-empty p {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

/* Order Cards */
.lookup-order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lookup-order-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #e85486;
}

.lookup-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lookup-order-number {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.lookup-order-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Status Colors */
.lookup-order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.lookup-order-status.paid {
    background: #d4edda;
    color: #155724;
}

.lookup-order-status.in_progress {
    background: #cce5ff;
    color: #004085;
}

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

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

.lookup-order-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.lookup-order-total {
    font-weight: 600;
    color: #e85486;
}

/* Back Button */
.lookup-back-btn {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 16px;
    width: 100%;
    transition: border-color 0.3s, color 0.3s;
}

.lookup-back-btn:hover {
    border-color: #e85486;
    color: #e85486;
}

/* Special page dark theme override */
.special-theme .lookup-modal-container {
    background: #1a1a2e;
    color: #fff;
}

.special-theme .lookup-modal-header {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.special-theme .lookup-input-group label {
    color: #ccc;
}

.special-theme .lookup-input-group input {
    background: #16213e;
    border-color: #2a2a4a;
    color: #fff;
}

.special-theme .lookup-input-group input:focus {
    border-color: #9c27b0;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.2);
}

.special-theme .lookup-search-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.special-theme .lookup-order-card {
    background: #16213e;
    border-left-color: #9c27b0;
}

.special-theme .lookup-order-number {
    color: #fff;
}

.special-theme .lookup-empty h3 {
    color: #ccc;
}

.special-theme .lookup-empty p {
    color: #888;
}

.special-theme .lookup-back-btn {
    border-color: #2a2a4a;
    color: #ccc;
}

.special-theme .lookup-back-btn:hover {
    border-color: #9c27b0;
    color: #9c27b0;
}

/* Responsive */
@media (max-width: 480px) {
    .lookup-modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .lookup-modal-header {
        padding: 20px;
    }

    .lookup-modal-body {
        padding: 20px;
    }
}