/* Sidebar styling */
.sidebar h2 {
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Item Library */
.item-library {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Category styling */
.item-category {
    margin-bottom: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #34495e;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.category-header:hover {
    background: #2c3e50;
}

.category-icon {
    font-size: 20px;
}

.category-label {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.category-toggle {
    font-size: 12px;
    transition: transform 0.2s;
}

.category-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-left: 8px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.category-items.collapsed {
    max-height: 0;
    margin-top: 0;
}

.category-items.expanded {
    max-height: 2000px;
}

/* Clickable items */
.clickable-item {
    padding: 12px;
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.clickable-item:hover {
    border-color: #3498db;
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.clickable-item:active {
    transform: scale(0.98);
}

.clickable-item .item-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.clickable-item .item-label {
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.clickable-item .item-dimensions {
    font-size: 10px;
    color: #7f8c8d;
}

.clickable-item.vehicle {
    border-color: #3498db;
}

.clickable-item.pallet {
    border-color: #e67e22;
}

.clickable-item.package {
    border-color: #2ecc71;
}

.clickable-item.passenger {
    border-color: #9b59b6;
}

/* Passenger Grid */
.pax-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    border: 2px solid #9b59b6;
    border-radius: 6px;
    overflow: hidden;
}

.pax-grid th {
    background: #9b59b6;
    color: white;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.pax-grid td {
    text-align: center;
    padding: 6px 4px;
    border: 1px solid #e8e0f0;
}

.pax-grid-row-label {
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
    background: #f8f4fc;
    min-width: 30px;
}

.pax-grid-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #9b59b6;
}

.pax-no-compartments {
    font-size: 12px;
    color: #95a5a6;
    font-style: italic;
    padding: 8px 0;
}

.pax-config-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.pax-config-row label {
    min-width: 90px;
    color: #7f8c8d;
    font-weight: 500;
}

.pax-global-input {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 12px;
    min-width: 0;
}

.pax-apply-btn {
    width: 100%;
    padding: 8px;
    background: #9b59b6;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 4px;
}

.pax-apply-btn:hover {
    background: #8e44ad;
}

.pax-clear-btn {
    width: 100%;
    padding: 6px;
    background: transparent;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 11px;
    margin-top: 6px;
    transition: all 0.2s;
}

.pax-clear-btn:hover {
    background: #fdecea;
}

.pax-active-summary {
    margin-top: 8px;
    padding: 8px;
    background: #f8f4fc;
    border-radius: 4px;
    border: 1px solid #e8e0f0;
}

.pax-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #2c3e50;
    padding: 2px 0;
}

.pax-summary-row span:last-child {
    color: #7f8c8d;
}

.pax-summary-total {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #d5c8e6;
    font-size: 11px;
    font-weight: 600;
    color: #9b59b6;
}

/* Popup info text for passengers */
.popup-info {
    font-size: 11px;
    color: #9b59b6;
    font-style: italic;
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid #ecf0f1;
}

.popup-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Passenger row in W&B panel */
.cargo-item-row.passenger-row {
    border-left: 3px solid #9b59b6;
}

/* Passenger section config in W&B panel */
.passenger-section-config {
    background: #f8f4fc;
    border: 1px solid #e8e0f0;
    border-left: 3px solid #9b59b6;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
}

.pax-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
}

.pax-section-rows {
    font-size: 10px;
    color: #7f8c8d;
    font-weight: 400;
}

.pax-section-inputs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pax-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.pax-input-row label {
    min-width: 65px;
    color: #7f8c8d;
    font-weight: 500;
}

.pax-input-row input {
    flex: 1;
    padding: 3px 5px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 11px;
    min-width: 0;
}

.pax-unit {
    font-size: 10px;
    color: #95a5a6;
    min-width: 20px;
}

/* Properties Panel */
.properties-panel {
    padding: 16px;
}

.property-group {
    margin-bottom: 16px;
}

.property-group label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    color: #2c3e50;
}

.property-group label span {
    font-weight: 600;
    font-size: 12px;
    color: #7f8c8d;
}

.property-group input {
    width: 100%;
}

.property-group .color-input {
    width: 100%;
    height: 36px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
}
