/**
 * My Garage Component Styles
 * WebDirect Romania - 2025
 */

.my-garage-component {
    position: relative;
}

.garage-dropdown {
    position: relative;
}

.garage-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.garage-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.garage-toggle i:first-child {
    font-size: 20px;
    color: #ff6b00;
}

.garage-label {
    font-weight: 600;
    white-space: nowrap;
}

.garage-selected,
.garage-placeholder {
    font-size: 12px;
    color: #8ba3b8;
    margin-left: 4px;
}

.garage-selected {
    color: #fff;
    font-weight: 500;
}

.garage-toggle i:last-child {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.garage-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 400px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.garage-dropdown-menu.show,
.garage-dropdown-menu[style*="opacity: 1"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.garage-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.garage-dropdown-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.garage-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.garage-close:hover {
    background: #f5f5f5;
    color: #333;
}

.garage-form {
    padding: 20px;
}

.garage-form-group {
    margin-bottom: 16px;
}

.garage-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.garage-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.garage-select:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.garage-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

.garage-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.garage-form-actions .btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.garage-form-actions .btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.garage-form-actions .btn-secondary:hover {
    background: #e5e5e5;
}

.garage-form-actions .btn-primary {
    background: #0066ff;
    color: #fff;
}

.garage-form-actions .btn-primary:hover {
    background: #0052cc;
}

.garage-saved-vehicles {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.garage-saved-vehicles h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#savedVehiclesList {
    max-height: 200px;
    overflow-y: auto;
}

.saved-vehicle-item {
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e5;
}

.saved-vehicle-item:hover {
    border-color: #0066ff;
    background: #f0f7ff;
}

.saved-vehicle-item.active {
    border-color: #0066ff;
    background: #e6f2ff;
}

/* Responsive */
@media (max-width: 768px) {
    .garage-dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: calc(100vw - 40px);
        max-width: 400px;
    }
    
    .garage-dropdown-menu.show {
        transform: translateX(-50%) translateY(0);
    }
    
    .garage-toggle {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .garage-label {
        display: none;
    }
    
    .garage-selected,
    .garage-placeholder {
        display: none;
    }
}

