/* Station All Prices Modal - Optimized Spacing */

.station-prices-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: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.station-prices-modal.show {
    opacity: 1;
}

.station-prices-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, 92%);
    max-height: 85vh;
    background: var(--modal-bg, white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.2));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.prices-modal-header {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    padding: 20px;
    position: relative;
    color: #000;
}

.prices-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prices-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.prices-modal-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    padding-right: 40px;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.prices-modal-subtitle {
    margin: 0;
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Modal Body */
.prices-modal-body {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Fuel Prices Table - Optimized */
.fuel-prices-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-card, white);
}

.fuel-prices-table thead {
    background: var(--surface-elevated, #f8f9fa);
    border-bottom: 2px solid var(--border, #e5e7eb);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fuel-prices-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #666);
}

.fuel-prices-table th:last-child {
    text-align: center;
}

.fuel-prices-table tbody tr {
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    transition: background 0.2s ease;
}

.fuel-prices-table tbody tr:hover {
    background: var(--surface-hover, #fafafa);
}

.fuel-prices-table tbody tr:last-child {
    border-bottom: none;
}

.fuel-prices-table td {
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary, #333);
}

/* Fuel Type Cell */
.fuel-type-cell {
    font-weight: 600;
    width: 60%;
}

.fuel-type-name {
    display: block;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.fuel-type-code {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary, #999);
    font-weight: 500;
}

/* Price Cell - Center Aligned */
.fuel-price-cell {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary, #FFB700);
    width: 40%;
    white-space: nowrap;
}

.fuel-price-cell .price-value {
    font-size: 22px;
    letter-spacing: -0.5px;
}

.fuel-price-cell .price-unit {
    font-size: 13px;
    opacity: 0.7;
    margin-left: 2px;
}

/* Validation Badge */
.validation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
    background: var(--surface-elevated, #f0f0f0);
}

.validation-badge.validated {
    background: #d1fae5;
    color: #065f46;
}

.validation-badge .badge-icon {
    font-size: 11px;
}

/* Empty State */
.no-prices {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary, #999);
}

.no-prices-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-prices-text {
    font-size: 15px;
    margin: 0;
}

/* Modal Footer */
.prices-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border, #e5e7eb);
    background: var(--surface-elevated, #f8f9fa);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.update-time {
    font-size: 11px;
    color: var(--text-secondary, #666);
}

.validate-btn {
    padding: 8px 16px;
    background: var(--primary, #FFB700);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.validate-btn:hover {
    background: var(--primary-dark, #F59E0B);
    transform: translateY(-1px);
}

.validate-btn:active {
    transform: translateY(0);
}

/* Loading State */
.prices-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary, #999);
}

.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border, #e5e7eb);
    border-top-color: var(--primary, #FFB700);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive - Mobile */
@media (max-width: 480px) {
    .station-prices-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .prices-modal-header {
        padding: 16px;
    }

    .prices-modal-title {
        font-size: 18px;
    }

    .fuel-prices-table th,
    .fuel-prices-table td {
        padding: 12px;
    }

    .fuel-type-name {
        font-size: 14px;
    }

    .fuel-price-cell .price-value {
        font-size: 20px;
    }
}

/* Dark Mode Support */
:root[data-theme="dark"] .fuel-prices-table thead {
    background: var(--surface-elevated);
}

:root[data-theme="dark"] .fuel-prices-table tbody tr:hover {
    background: var(--surface-hover);
}

:root[data-theme="dark"] .prices-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #000;
}

:root[data-theme="dark"] .prices-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Smooth Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.station-prices-modal.show .station-prices-content {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar */
.prices-modal-body::-webkit-scrollbar {
    width: 6px;
}

.prices-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.prices-modal-body::-webkit-scrollbar-thumb {
    background: var(--border-dark, #ccc);
    border-radius: 3px;
}

.prices-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary, #999);
}
