/* Car Park Counter Styles */

.tx-carparkcounter {
    margin: 1rem 0;
}

/* Card styling */
.carpark-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.carpark-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carpark-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.carpark-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.carpark-card__body {
    padding: 1.25rem;
}

/* Link styling */
.carpark-link {
    color: inherit;
    text-decoration: none;
}

.carpark-link:hover {
    text-decoration: underline;
}

/* Status indicator */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
}

.status-indicator--loading {
    background: #ccc;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator--ok {
    background: #28a745;
}

.status-indicator--warning {
    background: #ffc107;
}

.status-indicator--critical {
    background: #dc3545;
}

.status-indicator--full {
    background: #6c757d;
}

.status-indicator--closed {
    background: #dc3545;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Availability display */
.carpark-availability {
    text-align: center;
    margin-bottom: 1rem;
}

.availability-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.availability-display .separator {
    color: #999;
    margin: 0 0.25rem;
}

.availability-display .total-spaces {
    color: #666;
    font-size: 1.5rem;
}

.availability-label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Progress bar */
.progress-bar-wrapper {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0 0.5rem;
}

.progress-bar {
    height: 100%;
    background: #28a745;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar--loading {
    width: 100%;
    background: linear-gradient(90deg, #e9ecef 25%, #d6d8db 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-bar--ok {
    background: #28a745;
}

.progress-bar--warning {
    background: #ffc107;
}

.progress-bar--critical {
    background: #dc3545;
}

.occupancy-percent {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}

/* Address section */

.carpark-name {
    text-decoration: none;
}
.carpark-address {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.875rem;
    color: #666;
}

.carpark-address::before {
    content: '';
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
}

/* Notice */
.carpark-notice {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #856404;
}

/* Error message */
.carpark-error .alert {
    margin-top: 1rem;
}

/* Table layout styles */
.carpark-table-wrapper {
    overflow-x: auto;
}

.carpark-table {
    width: 100%;
    margin-bottom: 0;
}

.carpark-table th {
    font-weight: bold;
    white-space: nowrap;
}

.carpark-row {
    transition: background-color 0.2s ease;
}

.carpark-availability-cell {
    white-space: nowrap;
    font-weight: 600;
}

.carpark-availability-cell .separator {
    color: #999;
    margin: 0 0.25rem;
}

.carpark-availability-cell .total-spaces {
    color: #666;
}

.carpark-status-cell {
    vertical-align: middle;
}

/* State status display (for forced open/closed states) */
.carpark-state-status {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.carpark-state-status--open {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.carpark-state-status--closed {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Table view state status */
.carpark-availability-cell .carpark-state-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .availability-display {
        font-size: 2rem;
    }

    .availability-display .total-spaces {
        font-size: 1.25rem;
    }
}
