/* Smart Route Styles - Mobile Optimized */
:root {
    --celeb-yellow: #FFD700;
    --celeb-black: #1a1a1a;
    --celeb-gray: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--celeb-gray);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    background: #fff;
}

/* Header */
.header {
    background: var(--celeb-black);
    color: white;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.2);
}

.header-info {
    font-size: 14px;
    opacity: 0.9;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--celeb-gray);
    border-top-color: var(--celeb-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    margin-top: 20px;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
    text-align: center;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    padding: 20px;
}

/* Store Card */
.store-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--celeb-yellow), #ffd700cc);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.store-icon {
    font-size: 40px;
}

.store-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--celeb-black);
}

.store-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Sort Options */
.sort-options {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.sort-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn.active {
    background: var(--celeb-yellow);
    border-color: var(--celeb-yellow);
    color: var(--celeb-black);
}

/* Route List */
.route-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Route Card */
.route-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.route-card.completed {
    opacity: 0.6;
    border-color: var(--success-color);
}

.route-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--celeb-gray);
    cursor: pointer;
}

.route-number {
    width: 32px;
    height: 32px;
    background: var(--celeb-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.route-info {
    flex: 1;
    margin: 0 16px;
}

.route-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.route-type {
    display: inline-block;
    padding: 4px 12px;
    background: var(--celeb-yellow);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.route-time {
    font-size: 14px;
    color: var(--text-secondary);
}

.route-distance {
    font-size: 16px;
    font-weight: 700;
    color: var(--celeb-black);
}

.route-card-body {
    padding: 16px;
}

.route-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--celeb-gray);
    border-radius: 8px;
}

.route-address-icon {
    font-size: 20px;
}

.route-address-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
}

.route-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.detail-icon {
    font-size: 18px;
}

.route-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-navigate {
    background: #03C75A;
    color: white;
}

.btn-details {
    background: white;
    color: var(--celeb-black);
    border: 2px solid var(--border-color);
}

.btn-complete {
    background: var(--celeb-yellow);
    color: var(--celeb-black);
    grid-column: 1 / -1;
}

.btn-complete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
}

.btn-close {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--celeb-gray);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background: var(--celeb-gray);
    color: var(--text-primary);
    flex: 1;
}

.btn-primary {
    background: var(--celeb-yellow);
    color: var(--celeb-black);
    flex: 1;
}

/* Detail Modal Specific */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.detail-highlight {
    background: #fff9e6;
    border-left: 4px solid var(--celeb-yellow);
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.detail-highlight h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-highlight p {
    font-size: 20px;
    font-weight: 700;
    color: var(--celeb-black);
}

.warning-text {
    color: var(--warning-color);
    font-size: 14px;
    margin-top: 8px;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }
    
    .btn {
        font-size: 16px;
        padding: 12px 16px;
    }
}
