/* Order Requests Styles */

/* Order mode button */
#orderModeBtn.active {
    background: #34a853 !important;
    color: white !important;
    border-color: #34a853 !important;
}

/* Order selection indicators on cards */
.order-mode .product-card { cursor: pointer; }
.order-mode .product-card.order-selected {
    outline: 3px solid #34a853;
    outline-offset: -3px;
    background: #f0fff4;
}
.order-mode .product-card .order-check {
    display: flex;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #34a853;
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Order bar (bottom) */
.order-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #34a853;
    color: white;
    padding: 1rem 2rem;
    padding-right: 10rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.order-bar.visible { transform: translateY(0); }
.order-bar .order-bar-count { font-weight: 700; font-size: 1rem; }
.order-bar .order-bar-actions { display: flex; gap: 0.75rem; }
.order-bar .order-bar-actions .btn {
    padding: 0.5rem 1.25rem;
    border-radius: 980px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
}
.order-bar .btn-review {
    background: white;
    color: #34a853;
}
.order-bar .btn-clear-order {
    background: rgba(255,255,255,0.2);
    color: white;
}
.order-bar .btn-exit-order {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Order Review Overlay */
.or-review-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 1002;
    overflow-y: auto;
    padding: 2rem;
}
.or-review-overlay.active { display: flex; }

.or-review-box {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    margin: auto;
}

.or-review-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.or-review-header h2 {
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: #1e3a5f;
    font-size: 1.5rem;
}
.or-review-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Product rows in review */
.or-products-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #eee;
    border-radius: 12px;
}
.or-product-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}
.or-product-row:last-child { border-bottom: none; }
.or-product-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f8f8;
    flex-shrink: 0;
}
.or-product-info { flex: 1; min-width: 0; }
.or-product-style { font-size: 0.75rem; color: #0088c2; font-weight: 600; }
.or-product-name { font-size: 0.85rem; font-weight: 500; color: #1e3a5f; }
.or-product-colors { font-size: 0.75rem; color: #999; }
.or-product-qty { font-size: 0.85rem; font-weight: 600; color: #1e3a5f; white-space: nowrap; }
.or-remove-btn {
    width: 28px; height: 28px;
    border: none; background: #f5f5f5;
    border-radius: 50%; cursor: pointer;
    font-size: 14px; color: #999;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.or-remove-btn:hover { background: #fee; color: #d33; }

/* Form section */
.or-form-section {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.or-form-section h3 {
    margin: 0 0 1rem;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 1.1rem;
}
.or-field {
    margin-bottom: 1rem;
}
.or-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.35rem;
}
.or-field select,
.or-field input,
.or-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.or-field select:focus,
.or-field input:focus,
.or-field textarea:focus {
    outline: none;
    border-color: #0088c2;
}
.or-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Review actions */
.or-review-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Success screen */
.or-success {
    text-align: center;
    padding: 2rem;
}
.or-success-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.or-success h2 { color: #34a853; margin: 0 0 0.5rem; }
.or-success-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0.5rem 0;
}
.or-success p { color: #666; margin: 0.75rem 0; }
.or-detail-link {
    color: #0088c2;
    text-decoration: none;
    font-weight: 600;
}
.or-detail-link:hover { text-decoration: underline; }

/* Orders List Panel */
.orders-list-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 18px;
    margin-bottom: 2rem;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.orders-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.orders-list-header h2 {
    margin: 0;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 1.25rem;
}
.orders-list-filters {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.orders-list-filters select {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.85rem;
}

/* Order cards in list */
.or-list-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.or-list-card:hover { border-color: #0088c2; }
.or-list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.or-list-num { font-weight: 700; color: #1e3a5f; }
.or-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.or-status.pending { background: #fff3cd; color: #856404; }
.or-status.processing { background: #cce5ff; color: #004085; }
.or-status.completed { background: #d4edda; color: #155724; }
.or-status.cancelled { background: #f8d7da; color: #721c24; }

.or-list-card-body { font-size: 0.85rem; color: #555; }
.or-list-row {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
}
.or-list-label { color: #999; font-size: 0.8rem; }
.or-list-val { font-weight: 500; }
.or-list-notes {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #555;
    white-space: pre-wrap;
}
.or-list-so {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #e8f5e9;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #2e7d32;
    font-weight: 600;
}
.or-empty {
    color: #999;
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* Admin controls */
.or-admin-controls {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.or-admin-input {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.8rem;
    width: 110px;
}
.or-admin-btn {
    padding: 5px 12px;
    font-size: 0.75rem;
    color: white;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    font-weight: 600;
}
.or-admin-btn.processing { background: #0088c2; }
.or-admin-btn.complete { background: #34a853; }
.or-admin-btn.cancel { background: #dc3545; }

/* Order list action buttons */
.or-list-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}
.or-action-link {
    color: #0088c2;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}
.or-action-link:hover { text-decoration: underline; }
.or-action-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #555;
}
.or-action-btn:hover { background: #f5f5f5; border-color: #0088c2; color: #0088c2; }

/* Mobile */
@media (max-width: 768px) {
    .or-review-overlay { padding: 1rem; }
    .or-review-box { padding: 1.25rem; }
    .or-review-actions { flex-direction: column; }
    .order-bar { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .order-bar .order-bar-count { width: 100%; text-align: center; font-size: 0.875rem; }
    .order-bar .order-bar-actions { width: 100%; justify-content: center; }
}
