/* Enhanced styles for Private Taxi Dispatch */

/* Additional responsive improvements */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .connection-status {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* Enhanced form styling */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced status indicators */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.active {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.assigned {
    background: #fef3c7;
    color: #92400e;
}

/* Enhanced accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Improved animations */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Better message styling */
.error, .success {
    border-left: 4px solid;
    padding-left: 16px;
    animation: slideIn 0.3s ease-out;
}

.error {
    border-left-color: #ef4444;
}

.success {
    border-left-color: #10b981;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced table styling for history */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.history-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

/* Enhanced offer styling */
.offer-item {
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.offer-item:hover {
    border-left-color: #4f46e5;
    background: #f8fafc;
}

/* Tooltip styling */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background: #1f2937;
        color: #f9fafb;
    }

    input[type="text"],
    input[type="number"],
    select {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }

    .status {
        background: #374151;
        border-color: #4b5563;
    }

    .history-item,
    .offer-item {
        background: #374151;
        border-color: #4b5563;
    }
}