/* Room Service Runner View Styles - Mobile-First */

.roomservice-workspace {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* Header */
.roomservice-header {
    background-color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.roomservice-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.last-updated {
    font-size: 12px;
    color: #6c757d;
}

.refresh-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

.refresh-btn:hover {
    background-color: #0056b3;
}

.refresh-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.refresh-btn .material-icons {
    font-size: 24px;
}

/* Filter Bar */
.roomservice-filter-bar {
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.filter-status {
    flex: 0 0 auto;
}

.filter-search {
    flex: 1 1 200px;
}

/* Card List */
.roomservice-card-list {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Room Service Card */
.roomservice-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #007bff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.roomservice-card:active {
    transform: scale(0.98);
}

.roomservice-card.is-overdue {
    border-left-color: #dc3545;
    background-color: #fff5f5;
}

.roomservice-card.has-allergens {
    background-color: #fffaf0;
}

.roomservice-card.assigned-to-me {
    border-left-color: #28a745;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.room-info {
    flex: 1;
}

.room-number {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #007bff;
    line-height: 1.2;
}

.guest-name {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    color: #6c757d;
}

.time-info {
    text-align: right;
}

.elapsed-time {
    font-size: 20px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.elapsed-time.normal {
    color: #28a745;
    background-color: #d4edda;
}

.elapsed-time.warning {
    color: #ffc107;
    background-color: #fff3cd;
}

.elapsed-time.critical {
    color: white;
    background-color: #dc3545;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.promised-time {
    font-size: 14px;
    color: #6c757d;
}

.promised-time .asap {
    font-weight: 700;
    color: #dc3545;
}

/* Card Meta */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-number {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
}

/* Card Indicators */
.card-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.overdue-indicator {
    background-color: #dc3545;
    color: white;
}

.allergen-indicator {
    background-color: #ffc107;
    color: #212529;
}

.notes-indicator {
    background-color: #17a2b8;
    color: white;
}

.indicator .material-icons {
    font-size: 16px;
}

/* Items Summary */
.items-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.items-summary:active {
    background-color: #e9ecef;
}

.summary-text {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

/* Items List */
.items-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.item-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 8px;
}

.item-qty {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
    min-width: 50px;
}

.item-name {
    font-size: 16px;
    color: #212529;
}

.item-notes {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 60px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

.item-notes .material-icons {
    font-size: 16px;
}

/* Notes Preview */
.notes-preview {
    background-color: #fff3cd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #856404;
}

/* Assigned Indicator */
.assigned-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background-color: #d4edda;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #155724;
}

.assigned-indicator .material-icons {
    font-size: 18px;
}

/* Actions */
.roomservice-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.assigned-other {
    text-align: center;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 600;
}

.delivered-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background-color: #d4edda;
    border-radius: 8px;
    color: #155724;
    font-weight: 700;
    font-size: 16px;
}

.delivered-indicator .material-icons {
    font-size: 24px;
}

/* Tablet Layout (2 columns) */
@media (min-width: 768px) {
    .roomservice-card-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Layout (3 columns) */
@media (min-width: 1200px) {
    .roomservice-card-list {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Mobile-specific touch optimizations */
@media (max-width: 767px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-toggle,
    .filter-status,
    .filter-search {
        width: 100%;
    }

    .room-number {
        font-size: 24px;
    }

    .item-qty {
        font-size: 16px;
    }

    .item-name {
        font-size: 14px;
    }
}
