/* Location Panel Specific Styles - Enhanced Modern UI */

#locationSelection {
    margin-top: 15px;
}

#locationCount {
    margin-bottom: 12px;
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    font-weight: 600;
}

#locationList {
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid rgba(156, 39, 176, 0.3);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.8), rgba(20, 20, 20, 0.8));
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Site sections within location list */
.site-section {
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(156, 39, 176, 0.2);
    padding-bottom: 12px;
}

.site-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.site-section h5 {
    margin: 0 0 10px 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1));
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid #9C27B0;
    border-radius: 0 4px 4px 0;
}

/* Location grid layout */
.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 6px;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 0;
    border-bottom: 1px solid rgba(156, 39, 176, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 12px;
    position: relative;
    border-radius: 4px;
}

.location-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 4px 0 0 4px;
}

.location-item:hover::before {
    transform: scaleX(1);
}

.location-item:last-child {
    border-bottom: none;
}

.location-item:hover {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.15), rgba(156, 39, 176, 0.1));
    transform: translateX(5px);
}

.location-item.selected {
    background: linear-gradient(135deg, #9C27B0, #8E24AA);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
}

.location-item.selected::before {
    transform: scaleX(1);
}

.location-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #9C27B0;
}

.location-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 3px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.location-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.location-code {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-details {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 1px;
    color: #ccc;
}

.location-status {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 1px;
    color: #aaa;
}

/* Dual-side ALLOW/BLOCK access display for SPL locations */
.sides-access {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.side-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
}

.side-badge .side-icon {
    font-size: 10px;
    font-weight: 900;
}

.side-badge .side-label {
    font-size: 8px;
    letter-spacing: 0.3px;
}

.side-badge.allow {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.6);
    color: #66BB6A;
}

.side-badge.block {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.6);
    color: #EF5350;
}

.side-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    font-weight: 300;
    margin: 0 2px;
}

/* Selected location styling */
.location-item.selected .location-code {
    color: #000;
}

.location-item.selected .side-badge.allow {
    background: rgba(76, 175, 80, 0.5);
    border-color: rgba(76, 175, 80, 0.8);
    color: #4CAF50;
}

.location-item.selected .side-badge.block {
    background: rgba(244, 67, 54, 0.5);
    border-color: rgba(244, 67, 54, 0.8);
    color: #F44336;
}

.location-item.selected .location-details {
    color: #333;
}

.location-item.selected .location-status {
    color: #666;
}

.location-item.selected input[type="checkbox"] {
    accent-color: #fff;
}

/* Location list scrollbar */
#locationList::-webkit-scrollbar {
    width: 6px;
}

#locationList::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

#locationList::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 3px;
}

#locationList::-webkit-scrollbar-thumb:hover {
    background: #E85A2B;
}

/* Location panel visibility */
#locationPanel {
    transition: all 0.3s ease;
}

/* Location type color indicators for legend */
.location-legend {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 5px;
    font-size: 11px;
}

.location-legend h6 {
    margin: 0 0 5px 0;
    color: #FF6B35;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 3px 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 2px;
    border: 1px solid #555;
}

.legend-text {
    font-size: 10px;
    color: #ccc;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .location-grid {
        grid-template-columns: 1fr;
    }

    .location-item {
        font-size: 11px;
        padding: 5px 6px;
    }

    .location-code {
        font-size: 11px;
    }

    .location-details, .location-status {
        font-size: 9px;
    }
}